Webhook Portal · :8081 Suite Home
:8081

Webhook Portal

Receives TradingView alerts and custom signals, gates them through configurable rules and 30+ live technical indicator filters, then executes approved orders on Gunbot. Works with TradingView via ngrok — no cloud required.

Webhook endpoint: POST /webhook
Signal intelligence at the gate.
TradingView Webhooks

Receives POST webhooks from TradingView. Expose locally via ngrok with one command — the UI shows your live tunnel URL.

HMAC Signature Auth

Optional HMAC-SHA256 validation via X-WEN-Signature. Skipped when no secret is set — safe for TradingView which cannot send custom headers.

10 Gate Rule Types

Rate limiter, cooldown, time window, balance check, consensus, pair allowlist, direction filter — stack any combination per pair.

30+ Indicator Filters

EMA, RSI, MACD, BB, Stoch, ATR, ADX, CCI, MFI, VWAP, and 20+ more. Fetches live candles from Gunbot and blocks on any failed condition.

Live SSE Feed

Browser receives real-time push for every webhook received, gated, or executed — no polling, no page refreshes.

Persistent Config

All gate rules, indicator settings, and Gunbot credentials saved to webhook_config.json and restored automatically on restart.

How signals are processed
POST /webhook  { "action": "buy", "symbol": "BTC/USDT", "exchange": "bybit" }
         │
         ├─ Body size check         max 64 KB
         ├─ HMAC signature          skip if no secret configured
         ├─ Gunbot auth             Bearer token valid?
         ├─ Gate rules              rate / cooldown / time / balance / consensus…
         ├─ Indicator filter        fetch candles  RSI / MACD / BB / ATR…
         │
         ├─ APPROVED ────────── Gunbot REST ── Exchange
         └─ GATED    ────────── log + SSE push ── UI
Receiving TradingView alerts via ngrok
TradingView can only send webhooks to public HTTPS URLs. Run ngrok http 8081 in a terminal, copy the https://xxxx.ngrok.io URL, and paste it into TradingView's alert Webhook URL field. See the User Guide for the full setup walkthrough including alert message JSON.
10 configurable gate rule types
Webhook Portal — available gates
Rule typeDescription
Rate LimitMaximum N signals per time window (e.g. 3 per hour)
CooldownMinimum time between signals on the same symbol
Time WindowOnly allow signals between specified UTC hours
Balance CheckReject if Gunbot portfolio balance is below threshold
Indicator FilterBlock on live RSI, MACD, Bollinger Bands, ADX, and 26+ others
Direction FilterOnly allow buy, only allow sell, or both directions
Pair AllowlistAccept signals only for specific trading pairs
Signal ConsensusRequire N matching signals within a window before executing
Max Open PositionsBlock if Gunbot already holds N or more open positions
Drawdown GuardBlock if portfolio drawdown exceeds the configured threshold