explaingit

rocenger/tg-alpha-monitor

1PythonAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Python tool that logs into a personal Telegram account, records messages from accessible chats into SQLite, and extracts EVM and Solana contract addresses.

Mindmap

mindmap
  root((tg-alpha-monitor))
    Inputs
      Telegram API key
      config.json
      Group whitelist
    Outputs
      SQLite messages
      Digest report
      Bot notifications
    Use Cases
      Track crypto signals
      Archive chat history
      Build alpha digest
    Tech Stack
      Python
      Telethon
      SQLite
      systemd

Things people build with this

USE CASE 1

Capture messages from crypto Telegram groups you already belong to into a local SQLite database

USE CASE 2

Extract EVM addresses, Solana addresses, and dollar-ticker mentions for later analysis

USE CASE 3

Run a four-hour digest as a systemd timer that posts a summary back to a Telegram bot chat

USE CASE 4

Pipe the digest through an OpenAI compatible model for a short narrative summary when explicitly enabled

Tech stack

PythonTelethonSQLitesystemd

Getting it running

Difficulty · moderate Time to first run · 30min

Telegram session files are login credentials; the project ships a .gitignore that excludes them and warns to never commit them.

MIT license, free to use and modify with attribution and no warranty.

In plain English

TG Alpha Monitor is a Python tool that logs into a personal Telegram account using the same protocol the official Telegram clients use, then quietly records the messages from the groups and channels the user is already a member of. It is built on top of a library called Telethon. The README is explicit that the tool does not bypass Telegram permissions and cannot read chats the account cannot already access. The stored messages go into a local SQLite database. On top of that the tool can pick out things that look like crypto signals, including EVM contract addresses that start with 0x, Solana style addresses, and ticker mentions in the form $TICKER. A separate digest script reads the database and produces a short report about recent activity. That digest can be printed, returned as JSON, or sent to a chat through a Telegram bot, and the README also describes an optional summarization step that calls an OpenAI compatible language model API. Setting it up means putting Telegram API credentials, the api_id and api_hash from my.telegram.org, plus a phone number into an .env file, then running a setup command that logs the account in and creates a session file. A config.json file controls which groups are monitored, which are excluded, where the database and log files live, and whether contract and ticker extraction are on. Leaving the monitored list empty means all accessible groups are monitored. The README spends a lot of space on safety. Telegram session files are treated as sensitive login material, comparable to passwords, and the .gitignore excludes .env.session.session-journal, database files, and logs. No data is sent to a language model unless the user explicitly turns it on. There is no trading behavior and no message sending by default. For running the tool as a long lived service, the README provides systemd user unit files for the main monitor and for a periodic digest timer that fires every four hours, along with notes about enabling lingering so the service survives reboots without an SSH session. A Hermes Skill is included in skills/telegram-mtproto-monitor/SKILL.md, which can be copied into a Hermes setup so an agent can help install and troubleshoot the service. Roadmap notes mention a PostgreSQL backend, a web dashboard, retention rules per source, and CSV or JSON exporters. The license is MIT.

Copy-paste prompts

Prompt 1
Walk me through registering at my.telegram.org, putting api_id and api_hash in .env, and running the tg-alpha-monitor setup
Prompt 2
Write a config.json for tg-alpha-monitor that monitors three groups, excludes one, and turns off ticker extraction
Prompt 3
Install the tg-alpha-monitor systemd user units for the live monitor and a digest timer that fires every four hours
Prompt 4
Query the SQLite database to list every unique 0x contract address seen in the last 24 hours with frequency counts
Prompt 5
Enable the optional OpenAI compatible summarization safely so no message data is sent without an explicit flag
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.