revx-telegram
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTelegram Connector (revx connector telegram
)
revx connector telegramTelegram 连接器(revx connector telegram
)
revx connector telegramConfigure Telegram bot integrations for alert notifications from monitors and the grid bot.
Auth required. Make sureis installed and configured before running these commands. If any command fails with an auth-related error —revx,Auth not configured,No private key found,Authentication failed (401),Invalid signature, or a missing key/config file atinsecure permissions— invoke the~/.config/revolut-x/skill immediately and apply the fix yourself. Do not interrupt the user to ask them to run setup. Only escalate to the user for steps only they can perform (pasting the API key, registering the public key in their Revolut X profile, choosing a passphrase). After the fix, retry the original command.revx-auth
配置Telegram机器人集成,以接收来自监控器和网格机器人的警报通知。
需要身份验证。运行这些命令前,请确保已安装并配置。如果任何命令因身份验证相关错误失败——例如revx、Auth not configured、No private key found、Authentication failed (401)、Invalid signature,或者insecure permissions路径下缺少密钥/配置文件——请立即调用~/.config/revolut-x/技能并自行修复。不要打断用户让他们运行设置步骤。仅在需要用户亲自执行的步骤(如粘贴API密钥、在Revolut X个人资料中注册公钥、选择密码短语)时才向用户求助。修复后,重试原命令。revx-auth
Add a Connection
添加连接
bash
revx connector telegram add --token <bot-token> --chat-id <chat-id>
revx connector telegram add --token <token> --chat-id <id> --label prod --test| Flag | Description |
|---|---|
| Telegram Bot API token (required) |
| Telegram chat ID (required) |
| Connection label (default: "default") |
| Send test message after adding |
bash
revx connector telegram add --token <bot-token> --chat-id <chat-id>
revx connector telegram add --token <token> --chat-id <id> --label prod --test| 参数 | 描述 |
|---|---|
| Telegram Bot API令牌(必填) |
| Telegram聊天ID(必填) |
| 连接标签(默认值:"default") |
| 添加后发送测试消息 |
Behavioral Instructions for Claude
Claude行为指令
When the user wants to set up Telegram notifications, they need two things: a bot token and a chat ID. If either is missing, walk them through the setup below. Share the relevant steps as a message the user can follow — do not attempt to perform these steps via tools, as they require the user's Telegram app.
当用户想要设置Telegram通知时,他们需要两样东西:机器人令牌(bot token)和聊天ID(chat ID)。如果其中任何一项缺失,请引导他们完成以下设置步骤。将相关步骤作为用户可遵循的消息分享——不要尝试通过工具执行这些步骤,因为它们需要用户使用Telegram应用。
Setup Guide: Getting a Bot Token and Chat ID
设置指南:获取机器人令牌和聊天ID
Share the following instructions with the user when they need help setting up Telegram:
Step 1 — Create a Telegram Bot (to get the bot token):
- Open Telegram (mobile or desktop)
- Search for @BotFather and start a chat
- Send
/newbot - BotFather will ask for a display name (e.g., "My RevX Alerts") — type any name
- BotFather will ask for a username ending in (e.g.,
bot) — must be uniquemy_revx_alerts_bot - BotFather replies with your bot token — it looks like
123456789:ABCdefGHI-jklMNOpqrSTUvwxYZ - Copy the token and share it back here
Step 2 — Get your Chat ID:
- Open Telegram and find your new bot (search for the username you just created)
- Send any message to the bot (e.g., "hello")
- Open this URL in a browser — replace with the token from Step 1:
<YOUR_TOKEN>https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - In the JSON response, find — that number is your chat ID
"chat":{"id": <number>} - It's usually a positive number for personal chats (e.g., ) or a negative number for group chats (e.g.,
123456789)-1001234567890 - Copy the chat ID and share it back here
Step 3 — Add the connection (Claude runs this):
Once the user provides both values, run:
bash
revx connector telegram add --token <bot-token> --chat-id <chat-id> --testThe flag sends a test message to verify the connection works. If the test succeeds, the setup is complete.
--testTroubleshooting:
- "chat not found" or empty response — the user must send a message to the bot first, then retry the URL
getUpdates - "Unauthorized" — the token is incorrect, ask the user to copy it again from BotFather
- For group chats: the bot must be added to the group as a member, then someone must send a message in the group before shows the group chat ID
getUpdates
当用户需要Telegram设置帮助时,分享以下说明:
步骤1 — 创建Telegram机器人(获取机器人令牌):
- 打开Telegram(移动端或桌面端)
- 搜索**@BotFather**并开始对话
- 发送
/newbot - BotFather会要求输入显示名称(例如:"My RevX Alerts")——输入任意名称即可
- BotFather会要求输入以结尾的用户名(例如:
bot)——必须唯一my_revx_alerts_bot - BotFather会回复你的机器人令牌——格式类似
123456789:ABCdefGHI-jklMNOpqrSTUvwxYZ - 复制令牌并在此处分享
步骤2 — 获取聊天ID:
- 打开Telegram,找到你刚创建的机器人(搜索你设置的用户名)
- 向机器人发送任意消息(例如:"hello")
- 在浏览器中打开以下URL——将替换为步骤1中获取的令牌:
<YOUR_TOKEN>https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - 在JSON响应中,找到——这个数字就是你的聊天ID
"chat":{"id": <number>} - 个人聊天通常是正数(例如:),群组聊天通常是负数(例如:
123456789)-1001234567890 - 复制聊天ID并在此处分享
步骤3 — 添加连接(由Claude执行):
一旦用户提供了这两个值,运行:
bash
revx connector telegram add --token <bot-token> --chat-id <chat-id> --test--test故障排除:
- "chat not found"或响应为空——用户必须先向机器人发送消息,然后重试该URL
getUpdates - "Unauthorized"——令牌不正确,请让用户重新从BotFather复制令牌
- 对于群组聊天:必须将机器人添加为群组成员,然后有人在群组中发送消息后,才会显示群组聊天ID
getUpdates
Manage Connections
管理连接
bash
revx connector telegram list # List all connections
revx connector telegram test <connection-id> # Send test message
revx connector telegram test <id> --message "Custom test"
revx connector telegram enable <connection-id> # Enable connection
revx connector telegram disable <connection-id> # Disable connection
revx connector telegram delete <connection-id> # Delete connectionbash
revx connector telegram list # 列出所有连接
revx connector telegram test <connection-id> # 发送测试消息
revx connector telegram test <id> --message "Custom test"
revx connector telegram enable <connection-id> # 启用连接
revx connector telegram disable <connection-id> # 禁用连接
revx connector telegram delete <connection-id> # 删除连接How Notifications Work
通知工作原理
Once a Telegram connection is configured and enabled:
- Monitor alerts (see skill) are automatically sent as Telegram messages when triggered
revx-monitor - Grid bot events (see skill) send notifications on startup, shutdown, fills, and P&L changes
revx-strategy
No additional configuration is needed — active monitors and the grid bot detect enabled Telegram connections automatically.
一旦Telegram连接配置完成并启用:
- 监控器警报(参见技能)触发时会自动以Telegram消息形式发送
revx-monitor - 网格机器人事件(参见技能)会在启动、关闭、成交以及盈亏变化时发送通知
revx-strategy
无需额外配置——活动的监控器和网格机器人会自动检测已启用的Telegram连接。
Related Skills
相关技能
| Skill | Purpose |
|---|---|
| Set up price/indicator alerts that notify via Telegram |
| Grid bot sends trade notifications via Telegram |
| API key setup and configuration |
| 技能 | 用途 |
|---|---|
| 设置通过Telegram通知的价格/指标警报 |
| 网格机器人通过Telegram发送交易通知 |
| API密钥设置与配置 |