What the TelegramBot does for you
The TelegramBot is your always-on trade-close feed. While the TradingBot is busy executing your strategy, the TelegramBot watches the closed-trade ledger and forwards each new round-trip to your phone — with the buy price, sell price, profit, and your running totals all pre-formatted for you. You don’t need to refresh the dashboard. You don’t need to be at your desk. You don’t need to interpret raw exchange data. The message you receive is already the answer. For an operator running a bot 24/7 across many trading days, this single, predictable, low-friction notification stream is the difference between actively trusting the system and constantly checking on it. The peace of mind compounds.Posts every closed trade
Includes running totals
Survives Telegram rate limits
Splits long batches automatically
4096-character limit and splits cleanly into multiple posts.Boots gracefully
Reads from local database only
5 seconds. Authoritative trade data is local; Telegram is just a delivery channel on top.Why it’s notification-only — and why that’s a feature
The reason: Telegram is not a hardened admin surface. Anyone who gets your phone — or compromises your Telegram session — would otherwise have access to your trading bot. By keeping the channel notification-only, the worst-case if your Telegram chat leaks is that someone reads your trade history. They cannot place trades, change capital, or touch the kill switch. Operator control lives in your Dashboard, behind your authentication. Telegram is a read-only window onto your bot’s results. The two roles are separated on purpose — control surface and visibility surface should never be the same surface, because they have different threat models.Why this matters for your security posture
Why this matters for your security posture
/buy BTC 1000 from Telegram. That convenience comes at a security cost. unCoded chose against the convenience.Why this matters for your operator discipline
Why this matters for your operator discipline
/buy ETH 5000 — and now you’re trading on emotion, not on rules.The TelegramBot’s notification-only design forces a small but valuable speed bump: to act, you have to log into the Dashboard. That extra friction means impulsive operator-induced trades are harder. The system is built to let the bot do its rule-bound thing, not to make operator-driven discretion frictionless.What you receive — the exact message format
Every closed trade produces a block like this in your Telegram chat:Why every field is here
Why every field is here
ID— the auto-incrementing trade ID. Useful when cross-referencing in the Dashboard or in your tax export.Symbol— the trading pair. Tells you which symbol made the trade.Buy Price/Sell Price— to8decimals so even sub-cent symbols are accurate.Sell Quantity/Sell USD— the position size and its USD value, so you can sanity-check sizing.Profit/Profit Percentage— both the absolute USD figure and the percentage. Useful different ways: absolute for tax/accounting, percentage for “is this trade in line with the mode’s expected ladder rungs?”Buy Time/Sell Time— when the trade opened and closed. The hold duration is the difference; useful for understanding “is this mode trading on the timescale I expected?”Total Profit/Total Volume— the running cumulative figures, calculated up to and including this trade. So every notification updates your “current state” without requiring you to add anything mentally.
What the TelegramBot does NOT notify
The list of what the bot does not do is longer than what it does. That’s intentional.How it stays in sync
The TelegramBot polls your local database every5 seconds for new closed trades. When it finds new rows, it processes them in chronological order, batches them into messages, and posts to your chat. The cursor (last-processed trade ID) is held in memory — efficient, simple, no extra database tables to maintain.
What happens during a Telegram outage
What happens during a Telegram outage
What happens during a TelegramBot restart
What happens during a TelegramBot restart
What happens during a TradingBot pause
What happens during a TradingBot pause
What happens during high-volume periods
What happens during high-volume periods
100, formats them into multi-block messages, splits them at the 4096-character Telegram limit, and queues them with a 50ms delay between sends to respect Telegram’s throttle. You’ll receive the full batch as multiple sequential messages, in chronological order — none missed.This batch behaviour means a high-volume minute might produce 2–4 sequential Telegram messages instead of 50 — far easier to read on a phone, and respectful of Telegram’s rate limits.What happens during database connection drops
What happens during database connection drops
Setting up your Telegram bot
The TelegramBot expects three pieces of configuration: a bot token (from Telegram’s BotFather), a chat ID (where messages should land), and the connection to your local database. The Dashboard’s onboarding flow walks you through getting all three.Create your Telegram bot via BotFather
@BotFather, send /newbot, follow the prompts (give your bot a name and a username), and you’ll receive a bot token that looks like 123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11. Save this token securely — it’s the equivalent of a password for your bot.BotFather will also offer you the option to set a profile picture, a description, and an “About” text. These are cosmetic — skip if you want, customize if you enjoy it.Create a private Telegram chat or group
Find your chat ID
getUpdates API to read it from the chat metadata. The chat ID is a number — typically negative for groups (e.g., -1001234567890).For a 1-on-1 chat with the bot, the chat ID is positive (your user ID).Configure the TelegramBot container
.env file directly.Verify with a test trade
Pin a setup message in the chat
- “Mode 4 BasicMode on BTCUSDT, 10k reserve”
- “Kill switch lives at https://dashboard.yourdomain.com — bookmark”
- “Tax export end of every month”
Operator routines built around the Telegram feed
The Telegram feed is the rhythm of your day-to-day operation. Here’s how operators typically use it.Daily — quick scan, no action
Daily — quick scan, no action
30 seconds:- Scroll through the trades that closed since the last check.
- Glance at the running
Total Profitto confirm it’s tracking your expectations. - If anything looks weird (very large loss, unexpectedly long hold time, symbol you didn’t expect), tag that for later review in the Dashboard.
30 seconds instead of 5 minutes of dashboard inspection.Weekly — structured review
Weekly — structured review
- Cross-check the Telegram running total against the Dashboard’s analytics. They should agree to the cent.
- Identify your worst trade of the week. Open the Dashboard, find it in the order ledger, look at the buy and sell rungs. Did the mode behave as designed, or was there an anomaly?
- Identify your best trade. Same exercise — was it the mode hitting expected rungs, or was it riding an unusually large move?
- Confirm the symbols you expected to be trading actually traded. A symbol that goes a week without closing a trade is often a signal that capital sizing or mode configuration needs review.
Monthly — tax archive
Monthly — tax archive
- Pull the Tax Report from the Dashboard for the month.
- Cross-check the report’s total against the Telegram running total at the last trade of the month.
- Archive the report (CSV or JSON) to a designated folder.
- Optionally, take a screenshot of the last Telegram trade of the month and archive alongside the report — provides a third source of truth for that month’s closing balance.
Yearly — full audit
Yearly — full audit
- Pull the full-year Tax Report.
- Verify total against the sum of monthly archives.
- Verify total against the Telegram running total at year-end.
- All three should agree. If they don’t, this is a flag to investigate — usually the cause is a data-restoration boundary (e.g., the local database was restored mid-year and the running total reset).
- Send to your accountant.
Privacy and operational considerations
What information is in your Telegram chat
What information is in your Telegram chat
- Every closed trade with prices, quantities, and P&L.
- Your running cumulative profit and trading volume.
- The symbols you trade.
- Your exchange API keys (those live in the TradingBot’s environment, not in any notification).
- Your wallet addresses.
- Your dashboard password or session.
- Your VPS access credentials.
Adding a witness — partner, accountant, advisor
Adding a witness — partner, accountant, advisor
- Spousal accountability. A partner who shares the household balance sheet has visibility into the bot’s contribution.
- Accountant access. Your accountant sees trades as they happen and can ask questions in real time, not just at year-end.
- Advisor visibility. A financial advisor with read access can spot operator-induced patterns you might miss yourself.
Mute hours and quiet times
Mute hours and quiet times
- iOS / Android: Telegram’s chat-level “Mute” with custom-hours.
- Desktop: Same per-chat mute available.
- Telegram-wide: “Do Not Disturb” hours.
Archive vs delete
Archive vs delete
.json files quarterly via Telegram’s built-in export tool. This gives you a portable, vendor-independent record beyond what the local database holds.Common questions
Can I use the same bot for multiple TradingBots?
Can I use the same bot for multiple TradingBots?
2–3 exchanges, this is fine — the symbol naming usually disambiguates (BTCUSDT is Binance/Bybit, BTC-USDT is OKX). For more separation, run a separate TelegramBot container per exchange, each reading the relevant subset of trades.Can I have one chat per mode?
Can I have one chat per mode?
Can I mute the bot during sleeping hours?
Can I mute the bot during sleeping hours?
Can I customize the message format?
Can I customize the message format?
Why don't I get a notification when a buy fills?
Why don't I get a notification when a buy fills?
What if my Telegram bot token leaks?
What if my Telegram bot token leaks?
/revoke), then generate a new token. Update your TelegramBot container’s environment variable and restart it. The old token is dead the moment you revoke.What an attacker with your bot token can do: read your chat (which contains your trade history) and post fake messages into the chat. What they cannot do: place trades, change your bot configuration, withdraw funds. Your TradingBot doesn’t trust the TelegramBot — it has no path back to your exchange via Telegram.This is a property of the architecture: the TelegramBot is downstream of everything important. Compromising it doesn’t compromise your trading.Is there a Discord version? Slack? Email?
Is there a Discord version? Slack? Email?
Does it use up my Telegram message quota?
Does it use up my Telegram message quota?
50ms delay between sends and handles 429 Too Many Requests automatically. In normal operation you will never hit a rate limit.Can I get a daily summary at a specific time?
Can I get a daily summary at a specific time?
- Scroll the chat at the same time every day. Telegram makes this trivial — open the chat at 09:00, scroll back to yesterday’s 09:00 mark, you’ve seen the day.
- Pull the Dashboard’s analytics for the day. The Dashboard supports daily-windowed views with totals, win rate, average trade size, etc.
What if I run two operators on the same bot?
What if I run two operators on the same bot?
Can I export the Telegram chat history?
Can I export the Telegram chat history?
- Long-term archival beyond your local database.
- Tax preparation as an additional source of truth.
- Investor reporting (summarize the chat into a quarterly report).
Operational footprint
Resource cost
Network calls
Failure mode
Startup time
Database load
5 seconds plus a few aggregate queries on each polling cycle. Negligible load on the database.Telegram quota
30/sec bot rate limit even in worst-case high-volume scenarios. No concern in practice.