← 返回
沟通协作 Key 中文

Signallink

Forward trading alerts and webhook events from TradingView to Telegram instantly. No subscriptions, no middlemen.
即时将TradingView交易提醒和webhook事件转发到Telegram,无需订阅,无中间商。
shinzzyak
沟通协作 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 544
下载
💾 10
安装
1
版本
#latest

概述

SignalLink — Webhook-to-Telegram Signal Router

A lightweight, open-source bridge that receives webhook alerts (e.g. from TradingView) and forwards them as clean, formatted messages to a Telegram bot. No paid services, no third-party subscriptions — just deploy and route.

When To Use This Skill

Use SignalLink when the user wants to:

  • Forward TradingView price alerts or strategy signals to Telegram
  • Route any webhook event (uptime monitors, CI/CD pipelines, custom alerts) to Telegram
  • Set up a self-hosted trading signal notification system
  • Replace paid signal routing services with a free, open-source alternative

Setup

Step 1 — Get a Telegram Bot Token

  1. Open Telegram and message @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the bot token — it looks like 123456789:ABCdef...

Step 2 — Get Your Chat ID

  1. Message @userinfobot on Telegram
  2. It will reply with your Chat ID

Step 3 — Configure Environment

cp .env.example .env

Edit .env:

TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
WEBHOOK_SECRET=your_secret_here   # Optional but recommended
PORT=8000

Step 4 — Run

With Docker (recommended):

docker compose up -d

With Python:

pip install -r requirements.txt
python -m App.main

Server starts at http://localhost:8000

Endpoints

MethodPathDescription
---------------------------
GET/Health check
GET/healthDetailed health status
POST/webhookMain endpoint — auto-detects signal format
POST/webhook/rawRaw key-value formatter for generic alerts

Usage Instructions

When a user asks to forward trading signals or webhook alerts to Telegram:

  1. Ask for their TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID if not already set
  2. Guide them to set up the .env file using .env.example as a template
  3. Start the server using Docker or Python
  4. Point their webhook source (e.g. TradingView) to http://:8000/webhook
  5. Optionally set WEBHOOK_SECRET and instruct the user to pass it as the X-Webhook-Secret header

TradingView Integration

In TradingView, set the alert webhook URL to:

http://your-server-ip:8000/webhook

Set the alert message body to JSON:

{
  "action":   "buy",
  "symbol":   "XAUUSD",
  "price":    "{{close}}",
  "interval": "{{interval}}",
  "strategy": "My Strategy",
  "sl":       "2330.00",
  "tp":       "2370.00",
  "lot":      "0.1",
  "message":  "Signal confirmed."
}

Supported Payload Fields

FieldAliasDescription
---------------------------
actionsignalSignal direction: buy, sell, close, neutral
symboltickerTrading pair, e.g. XAUUSD, EURUSD, BTCUSD
pricecloseEntry or current price
intervaltimeframeChart timeframe, e.g. 1H, 4H, 1D
strategystrategy_nameStrategy name
slstop_lossStop loss level
tptake_profitTake profit level
lotquantityLot size or quantity
messagemsgCustom note or description

Testing

Send a test webhook with curl:

curl -X POST http://localhost:8000/webhook \
  -H "Content-Type: application/json" \
  -H "X-Webhook-Secret: your_secret_here" \
  -d '{
    "action": "buy",
    "symbol": "XAUUSD",
    "price": "2345.50",
    "interval": "1H",
    "sl": "2330.00",
    "tp": "2370.00"
  }'

Example Telegram Output

🟢 BUY Signal

🥇 Pair:       XAUUSD
💰 Price:      2345.50
⏱️ Timeframe:  1H
🧠 Strategy:   EMA Crossover

🛑 Stop Loss:  2330.00
🎯 Take Profit: 2370.00
📦 Lot / Qty:  0.1

📝 Signal confirmed.

─────────────────────
⚡ Powered by SignalLink

Project Structure

SignalLink/
├── App/
│   ├── main.py        # FastAPI entry point
│   ├── webhook.py     # Request handler & auth
│   ├── formatter.py   # Payload → Telegram message
│   ├── telegram.py    # Telegram Bot API client
│   └── config.py      # Environment config
├── Examples/
│   ├── tradingview_payload.json
│   └── custom_payload.json
├── .env.example
├── requirements.txt
├── Dockerfile
└── docker-compose.yml

Security Notes

  • Always set WEBHOOK_SECRET in production to prevent unauthorized requests
  • The secret is validated via constant-time comparison to prevent timing attacks
  • Never expose your TELEGRAM_BOT_TOKEN publicly

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-30 09:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,592
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,433
communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,734