As of July 2026, the fastest way to automate TradingView alerts to Fyers is a webhook, and you have two routes. Route one is the no-code Fyers API Bridge — a Chrome extension plus a small bridge app (₹3,600/year) that reads your TradingView alert message and fires the order. Route two is your own webhook server built on the free Fyers API v3 (Python SDK fyers-apiv3, currently v3.1.13). Both can be live in about 10 minutes. Since SEBI’s retail-algo framework became mandatory on 1 April 2026, either route must place orders from a registered App ID mapped to a whitelisted static IP, or the order is rejected.
In my 8 years building Pine Script strategies and broker bridges for clients in 14+ countries, “connect my TradingView alert to Fyers” is one of the requests I get most from Indian traders. The good news: the Fyers side is genuinely free if you code it yourself, and near-instant if you use the Bridge. The catch that trips almost everyone up in 2026 is not the wiring — it is the static-IP compliance layer that SEBI now enforces. Here is exactly how to set up each route, with working code, and how to stay legal.
What you need before you start
- A funded Fyers trading account and an API app created at
myapi.fyers.in/dashboard(this gives you your App ID /client_idand secret key). - A TradingView plan that can fire webhooks. The free Basic plan cannot; you need at least the Essential plan (about $14.95/month billed annually), and 2-factor authentication must be enabled on your TradingView account for webhook alerts to work.
- A whitelisted static IP address registered against your Fyers App ID. From 1 April 2026 this is non-negotiable for order placement (more on this below).
The webhook itself is just an HTTP POST: TradingView sends your alert message to a URL the moment your condition triggers. What sits at that URL — the Bridge or your own server — is what turns the message into a Fyers order.
Route 1: Fyers API Bridge (no-code, ~10 minutes)
If you do not want to write a line of code, Fyers’ own API Bridge is the quickest path. It is a lightweight portable application plus a Chrome extension that works on the TradingView website, and it needs zero programming knowledge. The Bridge is a paid add-on at roughly ₹3,600 per year, separate from the free trading API.
The flow:
- Sign up for API Bridge from your Fyers account and install the desktop Bridge app.
- Add the FYERS API Bridge extension from the Chrome Web Store. On tradingview.com the grey icon turns red; click it and it turns green once connected to the Bridge.
- In the Bridge’s Symbol Settings, fill every column (OrdType, Quantity, product type — never leave them blank), and review Signal Settings and Risk Management. Practise in Paper Trading first before going live.
- On your TradingView chart, create an alert and put the signal details in the alert Message box. When the alert fires, the connector pushes the signal into the Bridge, which places the buy/sell order.
The TradingView alert message format
The Bridge parses a simple line-by-line message. Each constant must be spelled exactly:
SYMBOL: SBIN
TYPE: LE
TYPE is one of LE (Long Entry), LX (Long Exit), SE (Short Entry) or SX (Short Exit). Optional fields let you build richer orders:
PRICE:limit price — add it for a limit order instead of market.TRIG:trigger price — used for SL-M / SL-L orders.SL:andTGT:— add both to send a Bracket Order; add onlySL:for a Cover Order.
For example, a bracket order on entry is simply:
SYMBOL: SBIN
TYPE: LE
PRICE: 310
SL: 5
TGT: 10
You can even stack multiple SYMBOL/TYPE blocks in one message to leg into an options straddle or spread off a single index signal. This no-code route is the same one I walk through for Angel One in my TradingView to Angel One & Fyers automation guide — worth reading if you run both brokers.
Route 2: Your own webhook server on Fyers API v3
If you want full control, no annual Bridge fee, and custom logic (position sizing, risk filters, logging), you host your own webhook receiver on the free Fyers API v3. The official Python client is fyers-apiv3 (v3.1.13 as of June 2026). Install it with pip install fyers-apiv3.
First, on TradingView, emit a clean JSON payload from your Pine Script v6 strategy so the alert carries everything your server needs:
//@version=6
strategy("Fyers Webhook Demo", overlay = true)
longCondition = ta.crossover(ta.sma(close, 9), ta.sma(close, 21))
if longCondition
strategy.entry("Long", strategy.long, alert_message = '{"secret":"my-shared-secret","symbol":"NSE:SBIN-EQ","side":1,"qty":1}')
In the alert dialog, set the message to {{strategy.order.alert_message}} and choose “Once Per Bar Close” as the trigger — the single most reliable setting for automation, because the alert fires once at bar close rather than repainting intrabar. Point the webhook URL at your server.
Here is a minimal, working Flask receiver that verifies a shared secret and places a market order via the SDK:
from flask import Flask, request
from fyers_apiv3 import fyersModel
app = Flask(__name__)
client_id = "XXXXXXXXXX-100" # your App ID
access_token = "your_daily_access_token" # regenerated after daily 2FA
SECRET = "my-shared-secret"
fyers = fyersModel.FyersModel(client_id=client_id, token=access_token, is_async=False)
@app.route("/fyers-webhook", methods=["POST"])
def webhook():
alert = request.get_json(force=True)
if alert.get("secret") != SECRET:
return {"s": "error", "msg": "unauthorized"}, 401
order = {
"symbol": alert["symbol"],
"qty": int(alert["qty"]),
"type": 2, # 2 = market order
"side": int(alert["side"]),# 1 = buy, -1 = sell
"productType": "INTRADAY",
"limitPrice": 0,
"stopPrice": 0,
"validity": "DAY",
"offlineOrder": False,
}
return fyers.place_order(order)
if __name__ == "__main__":
app.run(host="0.0.0.0", port=80)
Three things that will save you hours:
- TradingView only posts to ports 80 and 443. Run behind a reverse proxy on 443 with TLS; never expose a raw dev server publicly.
- Always verify a secret (as above) so a leaked URL can’t be abused. Never put your Fyers credentials in the TradingView message itself.
- The access token dies daily. Under the 2026 rules you must complete 2FA once every trading day and regenerate the token — continuous refresh-token sessions are no longer supported.
Want this hardened into a production bot — auto token refresh, retries, position sizing and order logging? WhatsApp me at +91 77352 68199 and I’ll scope it with you.
Which route should you pick?
| Fyers API Bridge | Your own webhook (API v3) | |
|---|---|---|
| Coding needed | None | Python (basic) |
| Cost | ~₹3,600/year | Free API + hosting |
| Setup time | ~10 minutes | ~10–30 minutes |
| Custom logic | Limited to Bridge settings | Unlimited |
| Order types | Market, Limit, SL-L, SL-M, Cover, Bracket, options legs | Anything the API supports |
| Static-IP compliance | Runs on your machine’s IP | Runs on your server’s IP |
My rule of thumb: if you just want to mirror TradingView signals with standard order types and no fuss, the Bridge pays for itself in saved time. If you are running multiple strategies, need custom risk management, or want to avoid a recurring fee, host your own server. Either way, the compliance step below is identical.
SEBI compliance: the static-IP rule you cannot skip
This is the part people discover the hard way. SEBI’s retail-algo framework became fully effective on 1 April 2026, and it applies to anyone automating orders through the Fyers API or a third-party platform. The key requirements Fyers now enforces:
- Static IP whitelisting: orders are accepted only from a registered App ID mapped to a whitelisted static IP. Orders from any other IP are rejected. Validation applies to order requests (data endpoints are unaffected).
- Daily 2FA: authenticate once every trading day; no perpetual sessions.
- Rate limit: a maximum of 10 orders per second.
- Market orders are converted to MPP (Market Price Protection) orders.
- Third-party platforms must be empanelled and hosted within the broker’s infrastructure to keep placing orders.
If you do not already have a static IP, you get one from your ISP, a cloud provider such as AWS or GCP, or a VPC/VPN provider, then register it against your App ID in the Fyers dashboard. A cheap cloud VPS with a fixed IP is how most retail traders satisfy this — and it doubles as the always-on host for your webhook server. This mirrors the static-IP rule on Zerodha; I break down the full picture, including Algo-ID and per-second limits, in my Zerodha Kite Connect API pricing and rate limits guide. For a compliance-first checklist covering both brokers, see my developer’s guide to building SEBI-compliant algos in 2026.
Whether you go no-code or custom, I build and maintain both. See my Pine Script development services if you also need the strategy itself coded to fire clean, non-repainting signals.
Frequently asked questions
How do I automate a webhook from TradingView to Fyers?
Create an alert in TradingView with a webhook URL and a structured message. Either point it at the Fyers API Bridge (no-code, ~₹3,600/year), which parses SYMBOL/TYPE fields, or at your own server built on the free Fyers API v3, which converts the message into a place_order call. Both need a whitelisted static IP under SEBI’s 2026 rules.
Is the Fyers webhook / API free?
The Fyers trading API (v3) itself is free — you only pay for hosting your own webhook server. The separate, no-code Fyers API Bridge is a paid add-on at about ₹3,600/year. TradingView also requires at least its Essential plan (~$14.95/month annually) to fire webhooks.
Do I need a static IP for Fyers webhook automation?
Yes. Since 1 April 2026, Fyers accepts API orders only from an App ID mapped to a whitelisted static IP; orders from any other IP are rejected. You must also complete 2FA once per trading day.
What order types can I send to Fyers from a webhook?
Via the API Bridge you can send market, limit, SL-L, SL-M, cover and bracket orders, plus multi-leg options positions. Via your own API v3 server you can place anything the API supports, including basket and multileg orders. Note that market orders are auto-converted to MPP orders.
Which is better, Fyers API Bridge or coding my own webhook?
The Bridge is faster and needs no code but costs an annual fee and limits you to its settings. A custom server is free (beyond hosting), supports unlimited logic, and is better if you run several strategies. Compliance requirements are the same for both.
Ready to automate your Fyers strategy the right way — webhook wired, SEBI-compliant, and tested? Message me on WhatsApp at +91 77352 68199.
Risk disclaimer: Trading and investing in securities carry a substantial risk of loss and are not suitable for every investor. Automated strategies can amplify both gains and losses. Nothing in this article is investment advice or a guarantee of returns. Verify all pricing, order types and regulatory requirements directly with Fyers, TradingView and SEBI before deploying capital, as these can change. Trade only with money you can afford to lose.

Leave a Reply