Webhook Setup Guide (v3.2)

Connecting TradingView to PSX Bot securely.

← Back to Docs

The PSX Trading Bot now manages webhooks via a dedicated "Add Webhook Alert" Modal located on the `/webhooks` page.

How to Set Up an Alert
  1. Navigate to the Webhook Monitor page (`/webhooks`) in the dashboard.
  2. Click the + Add Webhook Alert button to launch the setup modal.
  3. Step 1: Copy the Webhook URL (which now automatically includes your secret key as a `?secret=` query parameter) and paste it into TradingView's Webhook URL field.
  4. Step 2: Select a JSON template. If you cannot edit the TradingView Pine Script of your strategy, use the Universal Strategy Template.
  5. Step 3: Paste the exact JSON message you intend to put into TradingView. The system will simulate placeholders (`{{close}}` , `{{ticker}}` , etc.) and validate your payload structure before you even save it.
  6. Step 4: Name your alert, define the ticker (or leave blank for all symbols), and paste in the TradingView Expiry Date so the bot can remind you 7 days before the alert expires.
  7. Step 5: Wait for the first signal. The alert will show up as `WAITING FIRST SIGNAL` in the My Alerts grid until TradingView fires it.

Using our PSX Hyper Intraday Engine v3?

You don't need to manually configure separate `{{close}}` placeholders. Our Pine Script dynamically packages the exact prices, stop-loss, and take-profit internally.

Simply attach the Secret Key directly to the end of the Webhook URL in TradingView (e.g., `https://api.yourdomain.com/api/webhook/tradingview?secret=YOUR_SECRET`), and paste {{strategy.order.alert_message}} into TradingView's alert message box.

Important TradingView Notes
  • TradingView webhook alerts require an Essential, Plus, or Premium plan.
  • Use "Once Per Bar Close" to avoid mid-bar repainting generating false signals.
  • If you rotate your secret key via the "Endpoint & Secret" popover, all existing alerts will be flagged `NEEDS RE-VALIDATION` and will reject incoming signals until you update the `?secret=` parameter in your TradingView alerts.