Skip to content
PD
Crypto Tools

FogelVibeTrade — Automated TradingView-to-Exchange Copy-Trading Platform

A backend system that turns TradingView strategy signals into live exchange orders and mirrors them across many subscribers' accounts in near real time, controlled through Telegram and an admin dashboard.

Problem

A trader with a profitable TradingView strategy wants it executed automatically and mirrored to subscribers' accounts — instantly, across many exchange keys at once — which is impossible to do by hand.

Result

TradingView signals hit a validated webhook, get queued, and a worker places orders for every subscribed user on their own exchange keys within moments — with configurable TP/DCA/SL, one-click mass close, Telegram signals and weekly performance summaries.

Tech Stack

PythonFastAPIPostgreSQLaiogram 3AlembicBitget / Bybit APITradingView WebhooksAsync Worker QueueGitHub Actions CI/CDVPS (systemd, Nginx/Caddy)

Overview

FogelVibeTrade is an automated trading backend that connects a TradingView strategy to live exchange execution — and mirrors every signal across many subscribers’ accounts at once. A strategy fires an alert on TradingView; a validated webhook receives it; a worker instantly places the corresponding order on each user’s own exchange keys, manages take-profit / DCA / stop-loss, and can close everyone out on a single command. The whole operation is monitored and controlled through Telegram and an admin dashboard. It’s a Python service — async FastAPI in front, a PostgreSQL-backed task queue in the middle, and a dedicated worker doing the exchange and messaging work.

Problem

A trader with a genuinely profitable TradingView strategy hits a wall the moment they try to scale it. Executing signals by hand is too slow — crypto entries and exits are measured in seconds — and offering the strategy to subscribers multiplies the problem: the same signal has to fire simultaneously across dozens of separate exchange accounts, each with its own API keys and risk settings, and a “close everything now” decision has to reach all of them at once. No human can place and manage that many orders in the window that makes the strategy work. It needs to be a system.

Solution

FogelVibeTrade splits the job into receive and execute, so signals never get lost and execution scales. TradingView Premium alerts POST to a FastAPI webhook that validates a passphrase, persists the signal to PostgreSQL and enqueues a task. A separate worker drains the queue and, for every subscribed user, places the order on that user’s own exchange keys (Bitget), applying configurable TP / DCA / SL from environment-driven settings. A mass-close command from the interface closes the position for everyone at once. Telegram is the control and monitoring surface: formatted signal messages, per-trade close notifications, and a weekly performance summary — plus an aiogram 3 trade-bot exposing /positions, /orders and /close. An admin dashboard manages users (trading balance, exchange keys, Telegram chat ID, profit-share %), shows active trades with the avatars of the users holding each one, and keeps an order history with PnL.

Features

  • Validated TradingView webhook — passphrase-checked ingestion of strategy alerts into a durable queue
  • Multi-account fan-out — one signal places orders across every subscribed user’s own exchange keys
  • Exchange execution on Bitget (Bybit used for market data), with configurable TP / DCA / SL
  • One-click mass close — exit every user’s position on a single command
  • Telegram control & alerts — formatted signals, trade-close notifications, weekly summaries, and an aiogram bot (/positions, /orders, /close)
  • Admin dashboard — users, exchange keys, chat IDs, profit-share %, active trades and PnL history
  • TradingView-accurate RSI — a Wilder (RMA) RSI computed from 15m candles aggregated to 45m, matching what the strategy sees on TradingView
  • Task-queue architecture — decoupled receive/execute so signals are never dropped under load

Architecture

The design is deliberately split so ingestion never blocks execution. An async FastAPI + uvicorn app receives webhooks and writes to PostgreSQL, which holds both the signals and the task queue. A separate worker process consumes tasks, talks to the exchange and sends Telegram messages — long, network-bound, occasionally-flaky work kept off the request path so a slow exchange call can never delay signal intake. Schema changes go through Alembic migrations. In production the app runs on 127.0.0.1 behind Nginx/Caddy, so TradingView can POST to a clean portless URL, and ships via GitHub Actions (syntax check + SSH deploy to a VPS running under systemd --user), with Railway as an alternative target. A small but important detail is indicator parity: the custom Wilder RSI module reproduces TradingView’s RMA-based calculation and candle aggregation exactly, so the backend’s numbers equal the ones the trader sees on the chart.

Results

  • Strategy signals execute automatically across all subscriber accounts moments after firing — no manual clicks
  • Instant mass-close capability to exit everyone at once when the strategy calls for it
  • Telegram-native operation: live signals, close notifications and weekly performance reports
  • Commission-ready model — per-user profit-share configured in the admin dashboard
  • Reproducible CI/CD deployment to a VPS, with a documented alternative on managed hosting

What Was Learned

The decision that made everything else work was decoupling the webhook from execution with a durable queue. TradingView fires once and expects a fast 200; the actual work — placing and managing orders across many accounts and messaging Telegram — is slow and failure-prone, so it belongs in a worker that can retry without ever dropping a signal. The second lesson was subtler: matching TradingView’s indicator math exactly is non-trivial. Wilder’s RSI uses RMA smoothing, and aggregating 15-minute candles into 45-minute closes has to be done precisely, or the backend and the chart quietly disagree — and in trading, a silent disagreement is a lost position. Getting both right is what turns a clever script into a system a trader can actually put money behind.

Services used in this project

Related case studies

Need a similar system?

Tell me about your challenge — I will propose an architecture and the shortest path to a working product.