TradingView

Common mistakes and webhook security

Once the basic TradingView flow works, clean up the fragile parts. Most failures come from a wrong webhook URL, invalid JSON, the wrong placeholders, missing required fields, or leaving the webhook unprotected when a secret token would be safer.

Most common mistakes

  • Using an outdated webhook URL after the app restarts.
  • Sending invalid JSON or plain text.
  • Expecting a placeholder to express closes when it only returns buy or sell.
  • Using the wrong field names or omitting required fields.
  • Assuming TradingView webhooks work on a plan that does not support them.

Use a secret token

If you want protection against unauthorized webhook calls, use a long random secret and include it in every TradingView alert payload.

{"action":"buy","ticker":"EURUSD","secret":"YOUR_TOKEN"}

Best practice

  • Keep the secret private and out of public screenshots.
  • Rotate it if you think it leaked.
  • Retest with the correct secret and confirm Logs show expected behavior.