Skip to content

Guide

TradingView webhook without localhost or ngrok

TradingView posts each webhook from its own servers to a public address, so it cannot reach localhost. A local server needs a tunnel such as ngrok, or a host, and it has to stay on. With Nyria there is nothing to run: each strategy has a hosted webhook URL at trades.nyria.io. You paste it into the alert's Webhook URL box and the alert reaches a bot that places the order at your broker, or on Nyria Paper first.

Official documentation

Receive a TradingView webhook with no server

  1. 1

    Create a strategy

    In Nyria, select Create strategy and pick TradingView as the alert source. Choose the asset type and set what an entry and an exit do on each side.

  2. 2

    Copy the hosted URL

    Open the strategy's Integration tab and copy the webhook URL. It is https://trades.nyria.io/webhooks/ followed by a token that belongs to the strategy.

  3. 3

    Paste it into the alert

    In the TradingView alert dialog open Notifications, select Webhook URL, paste the URL and select Create. Paste the strategy's message into the Message box.

  4. 4

    Fire a test and read the log

    When the alert fires, the Logs tab on the strategy shows the ticker and side Nyria read. Test while only a paper bot is deployed.

What TradingView requires of the receiving address

  • Only ports 80 and 443 are accepted, so a tunnel has to forward from one of them.
  • A server that takes longer than three seconds to process a request has the request cancelled.
  • IPv6 is not supported for webhooks.
  • Webhook alerts are allowed only with two-factor sign-in turned on, on a paid TradingView plan.

Keep the URL private

  • The token in the URL is the only authentication, so anyone who has the URL can post to the strategy.
  • Select Rotate token on the Integration tab to replace it, then paste the new URL into the alert.

Questions

Can TradingView send a webhook to localhost?
No. TradingView sends it from its own servers, which cannot reach an address on your machine. It needs a public address on port 80 or 443.
Do I need ngrok with Nyria?
No. The webhook URL is hosted, so you run no server and no tunnel.
Does my firewall need to allow anything?
No. The hosted address is not on your network. Allowlisting TradingView's addresses only matters on a server you run yourself.
What does it cost?
Paper is free. Live trading from $15 a month.

Next

Test the strategy on a paper bot first

Paper is free. Live trading from $15 a month.