IP
PAPER₹0.00no open positionsLIVE₹0.00no open positions
OFF
PAUSED

Integrations

Toggle the public tunnel that lets TradingView reach the local webhook receiver. Only /api/integrations/* is exposed; every other route returns 403 from the tunnel.

ngrok tunnel

Off
Public URL
— tunnel inactive —
Webhook endpoint
enable the tunnel to get the URL
PID
Started
How it's scoped: the tunnel guard in server.ts only allows requests on /api/integrations/* through public hosts. Terminal, options chain, baskets, settings, broker logs, recommendations — all return 403 from the tunnel. Same-origin (localhost) traffic is unaffected.

Webhook tokens

0 active · 0 revoked
Create a new webhook secret

Generates a fresh secret string you paste into TradingView's alert payload (thesecret field). Each secret can be revoked individually. Give it a label so you remember which alert / strategy it belongs to.

👉 Enter a label to enable Create.

LabelModeHitsLast firedCreatedStatusAction
No tokens yet — mint one above.

Recent webhook alerts

No alerts yet. Fire a TradingView webhook (or run scripts/test-tv-webhook.sh) and they appear here within 5 seconds.

TradingView setup

  1. Enable the tunnel above; copy the Webhook endpoint URL.
  2. In TradingView, open any chart → Alerts (clock icon) → + Create Alert.
  3. Set your condition (Pine indicator output, price crossing, whatever fires the trade).
  4. Notifications tab → tick Webhook URL, paste the endpoint URL.
  5. Message field → one of the JSON payloads below. Replace the secret with one of your active token secrets (or the legacy env value), edit strike / side / lots / expiry, save the alert.
① Open a fresh position — BUY / SELL
{
  "secret":   "<your token secret>",
  "action":   "BUY",
  "symbol":   "NIFTY",
  "strike":   24050,
  "side":     "CE",
  "exchange": "NFO",
  "lots":     1,
  "expiry":   "2026-05-12",
  "orderType":"MARKET"
}
action: "BUY" or "SELL". side: "CE" for call, "PE" for put. orderType: "MARKET" or "LIMIT" — for LIMIT add "price": 50.00.
② Open every leg of a basket (BUY-first ordering)
{
  "secret":   "<your token secret>",
  "action":   "OPEN_BASKET",
  "basket":   "my-iron-condor"
}
basket = the basket's name in /orders. Legs are placed BUY-first so SPAN is charged at the spread rate.
③ Square off a single position
{
  "secret":   "<your token secret>",
  "action":   "CLOSE",
  "symbol":   "NIFTY",
  "strike":   24050,
  "side":     "CE",
  "exchange": "NFO",
  "expiry":   "2026-05-12"
}
④ Square off every leg of a basket (SELL-first ordering — reverses entry)
{
  "secret":   "<your token secret>",
  "action":   "CLOSE_BASKET",
  "basket":   "my-iron-condor"
}
basket = the basket's name in /orders. SELL legs close first so SPAN releases before the longs unwind.
⑤ Square off every open position (paper or live)
{
  "secret":   "<your token secret>",
  "action":   "CLOSE_ALL"
}

Frequency: Once per bar close for most setups (avoids over-firing). Live orders require both a live-allowed token and an explicit"mode": "live" in the payload. Without that, even a live token falls back to paper.