Setting up TradingView Webhooks

  1. Copy Webhook URL

    1. You can access this from here: https://dash.hextrade.io/accounts -> Webhooks

  2. TradingView Webhook Format

    1. For TradingView alerts, use this JSON structure:

      1. {
          "ticker": "NQ",
          "action": "{{strategy.order.action}}",
          "sentiment": "{{strategy.market_position}}",
          "quantity": "{{strategy.order.contracts}}",
          "price": "{{close}}",
          "platformType": "projectx",
          "accountId": "your_account_id",
          "tp": "100",
          "sl": "20"
        }
      2. Note: Stop Loss (sl) and Take Profit (tp) values are calculated in ticks.

  3. TradingView Alert Setup

    1. In your TradingView Pine Script strategy:

      • Set the webhook URL as the alert destination

      • Use the JSON format above in the alert message

      • Replace your_account_id with your actual account ID

  4. Field Mapping

    1. TradingView → API

      • tickersymbol

      • actionside

      • sentimentsentiment

      • quantityquantity

      • priceprice

    2. Required Fields

      • platformType (projectx, alpaca, etc.)

      • accountId (your account ID)

      • symbol or ticker

      • quantity

      • side or action

  5. Supported Platforms

    1. We currently support ProjectX and Tradovate.

Last updated