Help / Alerts
Notifications and webhooks
| Where | When the app is | Set it up |
|---|---|---|
| A pop-up and sound in the app | Open | On by default; Sound and Notifications in the Alerts tab |
| Your phone or computer (push) | Closed too | Push in the Alerts tab |
| Closed too | Also send it by email, per alert | |
| Discord, Slack, Telegram or your own server | Closed too | A webhook, per alert |
Push notifications#
- Open the Alerts tab and turn on Push.
- Allow notifications when the browser asks.
- Press Test to check one arrives.
Do this on each device you want notified. On an iPhone or iPad, first add the site to your home screen and open it from there (see Install).
Each fire is a notification of its own, so a repeat doesn’t silently replace the last one. Its Pause button pauses the alert without opening the app, and says so if the pause didn’t go through (signed out, say). With the chart open in front, it shows there instead of as a system notification. Tick or untick Push to my devices and Chime on open pages per alert in its dialog.
Notifications, emails and Telegram messages are written in the language set on your Account page (English or Spanish), with times in your time zone. Your own message text is sent as you wrote it. Quiet hours on the Account page are read in the time zone shown beside them: yours, unless you pick another.
Email#
Tick Also send it by email in the alert dialog. It goes to your account’s confirmed address, with a link to open the chart, one to manage your alerts, and one to stop that alert’s emails (it asks first).
Webhooks: Discord, Slack, Telegram#
Paste a webhook address into Send to a webhook in the alert dialog. Discord, Slack and Telegram get a formatted message; any other address receives the alert as JSON, for your own bot or automation.
Discord
- In your server: Server settings › Integrations › Webhooks › New webhook, and choose the channel.
- Copy webhook URL and paste it into the alert.
Slack
Create an app with Incoming webhooks on, add a webhook to a channel, and paste its URL.
Telegram
The simplest way: on the Account page, connect Telegram, tap the link, and say yes to your account in the chat. Then tick Also send it to Telegram on an alert. If the chat blocks the bot, it’s unlinked and you get an email saying so.
Or your own bot, as a webhook, with your token and chat id:
https://api.telegram.org/bot<token>/sendMessage?chat_id=<chat id>Your own server
Any other address gets a POST with a JSON body like this:
{
"eventId": "…",
"alertId": "…",
"instrumentId": "binance:BTCUSDT",
"symbol": "BTC/USDT",
"exchange": "binance",
"message": "BTC above 100k",
"price": 100012.5,
"firedAt": 1791262800000,
"schema": 2,
"interval": "1h",
"alertName": "BTC breakout",
"condition": {
"operator": "crossing-up",
"left": { "kind": "price" },
"right": { "kind": "indicator", "indicatorId": "ema", "plot": "value", "inputs": { "length": 200 } }
},
"values": { "left": 100012.5, "right": 99870.2, "plots": { "value": 99870.2, "ema": 99870.2 } },
"bar": { "time": 1791259200000, "open": 99500, "high": 100100, "low": 99400, "close": 100012.5, "volume": 812.4 }
}schema 2 adds the timeframe, the alert’s name, the condition (never a script’s source), the values of its two sides when it fired (an indicator’s by its plot and id too) and the bar it fired on. Fields may be added; none is taken away within a schema.
Or choose Send › the message as written: your message is the body, sent as JSON when it reads as JSON (a bot’s own order format, with {{price|raw}} and the like), else as text. Send test posts a sample and shows what the address answered.
Checking it’s us
Each request carries X-OTF-Event-Id (the same if it’s sent again, so you can drop repeats) and X-OTF-Signature: t=<seconds>,v1=<hex>: the HMAC-SHA256 of t, a dot and the body, with your signing key (Signing key in the dialog). Refuse a request whose signature doesn’t match, or whose t is more than a few minutes old. Rotate signing key makes a new key: requests are signed with it from then on, so update your server with the new one.
https addresses on the public internet; addresses on a private network are refused. A webhook that fails (no answer, 5xx or 429) is tried again, a few times over about an hour and a half; the log shows what happened. One that answers another 4xx isn’t tried again. The alert still reaches you in the app, by push and by email.TradingView and Pine Script are trademarks of TradingView, Inc. OpenTapefolio is not affiliated with or endorsed by TradingView.