TradingView Webhook Limits, Retries, and the 3-Second Timeout
The exact TradingView webhook transport rules, including 2FA, ports, content type, timeout behavior, qualifying 5xx retries, and duplicate-safe receiver design.
What are TradingView's documented webhook limits?
Webhook alerts require two-factor authentication, can target only ports 80 or 443, and are cancelled if the remote server takes longer than three seconds. Valid JSON is sent with an `application/json` content type; other messages use `text/plain`. For HTTP 500–599 responses except 504, TradingView can resend three times at five-second intervals, making four total deliveries.
These are transport rules, not execution guarantees. An alert can trigger successfully while the request fails at DNS, TLS, routing, receiver validation, broker authorization, or order placement. Conversely, a sender timeout does not prove that the receiver performed no work. The receiver may have accepted the body and continued processing just as the sender stopped waiting. That uncertain boundary is why a trading webhook must be traceable and duplicate-safe rather than built around the assumption that one chart event always equals one request and one order.
TradingView also states that IPv6 is not currently supported for webhooks and publishes sender IP addresses for receivers that need allowlisting. Treat the official support page as the current authority because infrastructure constraints can change. Do not copy an address list into a permanent firewall rule without a review process. For a hosted HexTrade endpoint, follow the private URL supplied in Accounts instead of adding an unsupported port, proxy redirect, or self-invented authentication query.
- Security gate: TradingView requires 2FA before webhook alerts are allowed.
- Network gate: public HTTP or HTTPS endpoint on port 80 or 443; private or local addresses are not valid targets.
- Timing gate: response within three seconds, with no assumption that external trade work completed.
- Retry gate: only documented 500–599 responses other than 504 qualify for up to three resends.
How should a receiver use the three-second budget?
Use the three seconds to authenticate the endpoint, parse and validate the body, establish a durable or otherwise reliable record, and return an intentional status. Do not synchronously wait for every downstream broker action if that cannot finish safely within the deadline. The response must represent a defined state, not a rushed success code that makes rejected work invisible.
The correct design depends on the receiver, but the boundary must be explicit. A fast `2xx` might mean accepted for processing rather than filled. If so, logs and callbacks must preserve the later broker result, and the operator must not read the HTTP response as execution proof. A `4xx` should represent a caller-correctable problem such as invalid data or access. A `5xx` should represent a server-side failure only when inviting TradingView's documented resend is safe for that request.
Slow DNS, TLS handshakes, redirects, overloaded application code, and synchronous dependency calls all consume the deadline. Redirecting to a login page is especially harmful because TradingView reports it as a 3xx delivery problem, not as an authenticated trade. Test the exact URL entered in the alert, from a public network path, with a realistically sized body. For HexTrade, use the generated endpoint directly and keep it private rather than placing an unnecessary redirect in front of it.
- 1
Validate early
Reject invalid content type, malformed JSON, missing route fields, or unsafe values before starting broker work.
- 2
Record identity
Attach a stable correlation fingerprint so a repeated delivery can find the same logical event.
- 3
Return deliberately
Map accepted, caller-invalid, and temporary server-failure states to documented response behavior.
- 4
Observe completion
Carry the correlation value into downstream evidence and reconcile the final broker state separately.
Which responses does TradingView retry?
TradingView documents resubmission only when the receiver returns HTTP 500 through 599, excluding 504. It waits five seconds and can resend three times. Do not assume redirects, 4xx validation failures, a 504, DNS errors, TLS failures, connection errors, or a sender-side timeout receive the same treatment. Investigate those outcomes instead of designing around an undocumented retry.
A status code is therefore part of the control plane. Returning `500` for malformed JSON can multiply a permanently invalid message into four deliveries. Returning `200` before preserving accepted work can lose an instruction if the process fails immediately afterward. Returning `400` for a temporary internal outage prevents the documented 5xx retry path. There is no universal implementation, but each code must be selected according to whether resubmission is useful and safe, not according to a generic error handler.
The exception for 504 matters. Although 504 sits inside the 5xx range, TradingView explicitly excludes it from webhook resubmission. A receiver or proxy that emits 504 cannot assume TradingView will try again. Likewise, the official three-second cancellation can create ambiguity without any HTTP status reaching the sender. Monitor TradingView's Webhook status column and your receiving system together; either side alone can show only part of the transaction.
| Observed outcome | Automatic resend documented? | Operator interpretation |
|---|---|---|
| 2xx | No | Receiver answered successfully; determine whether that means accepted or completed. |
| 3xx | No | Correct the URL, authorization redirect, or proxy configuration. |
| 4xx | No | Correct endpoint, access, format, fields, or rate-limit cause. |
| 500–599 except 504 | Yes, up to three resends | Expect as many as four deliveries and deduplicate them. |
| 504 | No under this rule | Investigate the gateway and reconcile receiver state before any manual action. |
| Three-second timeout or connection failure | Not documented by the resubmission rule | Treat delivery state as uncertain and use evidence rather than guessing. |
Why must every receiver tolerate repeated delivery?
A single TradingView trigger can legitimately reach a receiver four times after qualifying 5xx responses, and manual remediation can add more attempts. The receiver should identify the logical event before placing another order, return the existing result when appropriate, and distinguish a retry from a genuinely new strategy signal. HTTP delivery count must never be used as order quantity.
Create a fingerprint from stable event data that remains identical across resends: strategy or alert version, destination account, symbol, action, quantity, and an event time or sequence chosen by the signal producer. Do not base it on the receiver's arrival timestamp because every resend arrives at a new time. TradingView supports time placeholders, and HexTrade documents labels such as `strategyName`, `alertName`, `note`, and `tags`; those can improve human correlation, but do not invent an undocumented idempotency field for a product endpoint.
Idempotency also needs a state model. `received`, `validated`, `submitted`, `accepted`, `rejected`, and `unknown` are not interchangeable. If the first attempt reached a broker but the acknowledgement was lost, submitting again may create a second order. Hold an `unknown` event for reconciliation rather than treating it as failed. HexTrade's documented cooldown and quantity controls can limit some repeated activity, but they are guardrails with stated scope, not proof of a durable global idempotency guarantee.
A retry is the same intent, not a second vote
Design the receiving path so a qualifying 5xx resend looks up the original logical event. Never turn four possible HTTP deliveries into four futures orders.
How do JSON, authentication, and endpoint security interact?
Make the final alert message valid JSON so TradingView labels it `application/json`, and use a secure authenticated endpoint that does not require credentials in the message. Never embed logins, passwords, broker secrets, or personal data in the URL or body. A private webhook token should be treated like a secret, redacted from screenshots, logs, tickets, and chat.
Content type follows syntax. One trailing comma, unescaped quote, or malformed dynamic value can cause TradingView to send `text/plain`; a receiver expecting JSON may then return 4xx. That failure will not enter the documented 5xx retry path. Capture a rendered non-sensitive example and parse it before launch. Where a field can contain arbitrary text, constrain its alphabet or escape it correctly rather than assuming strategy labels can never include a quotation mark.
TradingView's security guidance is direct: do not send credentials in webhook URLs or messages. Authentication should be represented by the receiver's secure endpoint design, not by copying a broker password into Pine. HexTrade supplies a private webhook URL in Accounts and advises regeneration if it leaks. Use the exact HTTPS URL as documented, enable 2FA at TradingView, and restrict who can view or edit the alert configuration.
- Redact the complete webhook URL; its private token is not a harmless support identifier.
- Keep broker credentials in the connected service's protected account flow, never in Pine.
- Validate the final JSON body so the intended content type reaches the receiver.
- Review access to alerts because anyone who can edit the message can change route and order intent.
How do you test timeout and retry behavior safely?
Use a controlled non-trading receiver or documented dry-run route to exercise fast success, invalid input, qualifying 5xx, excluded 504, redirect, and delayed response cases. Record TradingView's alert-log status and every receiver arrival. Confirm that qualifying failures produce no more than four total sends and that repeated bodies cannot create repeated live orders before enabling execution.
Separate transport testing from broker testing. A purpose-built test endpoint can prove sender behavior without exposing an account, while HexTrade's `dryRun` can validate its planned trade without placing one. Do not deliberately force server errors against a live order route unless the service explicitly supports that test. The goal is to verify your assumptions about statuses and duplicates, not to manufacture uncertain broker submissions.
After the transport matrix passes, run one smallest-size end-to-end test in an appropriate market session. Save the alert time, Webhook status, sanitized body fingerprint, receiver record, broker order identifier if available, and final state. Pause if any layer is missing or contradictory. Limits are easiest to manage when evidence is assembled before an incident; under pressure, an unexplained timeout often tempts operators into a dangerous manual resend.
- 1
Prove the baseline
Send valid JSON to the exact endpoint and verify a prompt intentional response plus one recorded arrival.
- 2
Prove permanent failure
Use safe malformed input and confirm it is rejected clearly without qualifying server retries.
- 3
Prove resend handling
On an isolated test receiver, return a qualifying 5xx and verify repeated deliveries resolve to one logical event.
- 4
Prove uncertainty handling
Simulate a delay beyond three seconds and require reconciliation before any operator resubmits.
Sources and methodology
HexTrade Research uses official product, exchange, regulator, and vendor documentation. Policies and platform behavior can change; follow the linked source and verify current terms before trading.
- 1.How to configure webhook alerts — TradingView, accessed Aug 30, 2026
- 2.Webhook resubmission — TradingView, accessed Aug 30, 2026
- 3.What webhook errors mean — TradingView, accessed Aug 30, 2026
- 4.Using credentials for webhooks — TradingView, accessed Aug 30, 2026
- 5.Pine Script webhook payloads — HexTrade Docs, accessed Aug 30, 2026
- 6.TradingView webhook automation — HexTrade Docs, accessed Aug 30, 2026
Frequently asked questions
How many times can TradingView send one webhook trigger?
Up to four total deliveries under the documented resubmission rule: the initial send plus three resends, each after five seconds, when the receiver returns HTTP 500–599 except 504. Other failures do not automatically inherit this behavior, so check the official rule and delivery evidence.
Does TradingView retry a 504 response?
No, the official resubmission article explicitly excludes status 504 from the otherwise qualifying 500–599 range. Investigate the gateway and reconcile whether downstream work occurred. Do not manually replay a trading instruction until the first attempt's broker state is known.
Does a three-second timeout mean the order was not submitted?
Not necessarily. It means TradingView did not receive a response within its deadline. The receiver might have done no work, might still be processing, or might already have contacted a broker. Treat the outcome as unknown until receiver and broker records resolve it.
Can a TradingView webhook use port 8000 or 8003?
No. TradingView accepts webhook URLs only on ports 80 and 443. A service can run internally on another port behind a properly configured public HTTPS endpoint, but the URL entered in TradingView must use an allowed external port without a failing redirect.
Why did TradingView send my body as plain text?
TradingView uses `application/json` only when the alert message is valid JSON. A syntax error or broken dynamic string makes it `text/plain`. Inspect the rendered body for quotes, commas, escaping, and invalid values, then recreate and retest the alert if its snapshot changed.
Next step
Put the research into a controlled workflow
Start small, verify the broker and account rules, and keep risk controls between every signal and live order.
Explore webhook automationContinue reading
Educational content only. Futures are leveraged products and can produce losses greater than the amount you expected to risk. This article is not financial, legal, or prop-firm compliance advice.