TradingView is the most popular charting platform in the world, used by millions of traders to analyze markets and develop strategies using Pine Script. But TradingView alone cannot execute trades on your behalf. This is where webhook bots come in. By connecting TradingView alerts to a fomoed webhook bot, you can automatically execute trades on any supported exchange the moment your strategy generates a signal.
What Is a Webhook Bot?
A webhook bot listens for incoming HTTP requests (webhooks) containing trade instructions. When TradingView fires an alert, it sends a JSON payload to your bot's unique webhook URL. The bot parses the signal — buy, sell, close — and executes the corresponding trade on your connected exchange in milliseconds.
This setup lets you use TradingView's powerful charting and scripting tools for analysis while fomoed handles the actual trade execution, risk management, and position tracking.
Why Use Webhooks Instead of Built-In Strategies?
- Unlimited customization — Pine Script gives you access to hundreds of technical indicators and the ability to write custom logic. If you can code it in Pine Script, you can trade it through a webhook.
- Backtest first, trade live — TradingView lets you backtest your strategy on historical data. Once you are confident in the results, connect it to fomoed to go live.
- Combine multiple indicators — Create complex entry conditions using RSI, MACD, Bollinger Bands, volume profiles, and any other indicator supported by TradingView.
- External signals — Webhooks are not limited to TradingView. Any system that can send an HTTP POST request can trigger trades — custom scripts, Python bots, other platforms, or even Zapier automations.
Setting Up a Webhook Bot on fomoed
Step 1: Create the Bot
Log in to fomoed and create a new bot. Select your exchange and enter your API credentials. In the Strategy step, choose "Webhook" from the advanced strategies.
Step 2: Get Your Webhook URL
After selecting the Webhook strategy, fomoed generates a unique webhook URL for your bot. It looks something like:
https://fomoed.com/api/webhook/abc123def456
Copy this URL — you will paste it into TradingView's alert settings.
Step 3: Configure Your Trading Pair and Risk Settings
Complete the remaining setup wizard steps: select your trading pair, set your position size and leverage, configure take profit and stop loss levels, and set up notifications. These settings apply to every trade triggered by the webhook.
Step 4: Create a TradingView Alert
In TradingView, open the chart for your trading pair and apply your Pine Script strategy or indicator. Then:
- Click the "Alerts" button (clock icon) in the toolbar.
- Set the alert condition to your strategy's entry signal.
- In the "Notifications" tab, check "Webhook URL" and paste your fomoed webhook URL.
- In the "Message" field, enter the JSON payload that fomoed expects.
Step 5: Format the Alert Message
fomoed webhook bots accept a simple JSON format. The most common signals are:
- Open a long position:
{"action": "buy"} - Open a short position:
{"action": "sell"} - Close the current position:
{"action": "close"}
You can also include optional fields like "size" to override the default position size for a specific signal.
Pine Script Example
Here is a simple Pine Script strategy that generates webhook-compatible alerts:
A basic RSI crossover strategy: buy when RSI crosses above 30 (oversold), sell when RSI crosses below 70 (overbought). Set up two alerts in TradingView — one for the buy condition with the message
{"action": "buy"}and one for the sell condition with{"action": "sell"}. Each alert points to your fomoed webhook URL.
Testing Your Webhook
Before going live with real funds, test your setup:
- Use paper trading mode— На биржах CEX включите бумажную торговлю, чтобы убедиться, что сигналы принимаются и обрабатываются правильно.
- Проверьте логи бота— На странице сведений о боте fomoed есть вкладка «Журналы», на которой показаны все входящие веб-перехватчики и предпринятые действия.
- Начните с небольшой позиции— При переходе в режим реального времени используйте минимальный размер позиции для первых нескольких сделок, чтобы убедиться, что все работает как положено.
Продвинутые методы вебхука
Мультитаймфреймовое подтверждение
Создавайте отдельные оповещения для разных таймфреймов. Например, действуйте только по 5-минутному сигналу на покупку, когда 1-часовой тренд бычий. Используйте формат сообщения веб-перехватчика, чтобы включить контекст о временном интервале и настроить своего бота так, чтобы он требовал подтверждения в разных временных интервалах.
Динамический размер позиции
Включите"размер"в сообщении веб-перехватчика, чтобы изменить размер позиции в зависимости от уровня сигнала. Сигнал с высокой степенью достоверности из вашей стратегии Pine Script может привести к открытию более крупной позиции, тогда как более слабый сигнал использует меньший размер.
Несколько ботов, одна стратегия
Вы можете направить одно и то же оповещение TradingView на несколько ботов fomoed webhook на разных биржах. Это позволяет вам одновременно применять одну и ту же стратегию в Hyperliquid, Binance и Bybit.
Распространенные проблемы и решения
- Оповещение не срабатывает:Убедитесь, что ваш план TradingView поддерживает оповещения веб-перехватчика. Бесплатные планы имеют ограниченную функциональность оповещений.
- Вебхук не получен:Дважды проверьте URL-адрес в настройках оповещений TradingView. Убедитесь, что нет лишних пробелов и символов.
- Неверный JSON:TradingView отправляет сообщение точно так, как вы его набрали. Прежде чем сохранять оповещение, проверьте формат JSON.
- Сделка не выполняется:Проверьте журналы бота на наличие сообщений об ошибках. Распространенные причины включают недостаточный баланс, недействительную пару или остановку бота.
Почему отдают предпочтение Webhook Trading
Инфраструктура веб-перехватчиков fomoed разработана для скорости и надежности. Входящие сигналы обрабатываются за миллисекунды, а ваш бот круглосуточно работает на облачных серверах, поэтому никогда не пропускает оповещения. В сочетании со встроенными функциями тейк-профита, стоп-лосса и трейлинг-стопа вы получаете полное управление сделкой без написания дополнительного кода. Боты DEX бесплатны, что делает его идеальной платформой для тестирования и внедрения ваших стратегий TradingView.


