Trade alerts from a Telegram chat you run
Link your Telegram account, add the Nyria bot to a group or channel you run, and trade the alerts posted there.
A Telegram alert becomes an order when a message posted in a group or channel you run reaches Nyria: it reads a ticker, a direction and an action from the text, and each bot deployed on the strategy places the trade at its broker. Nyria joins the chat as an admin that only reads and never posts. An edited message is not traded, and an alert handled more than a minute late places no new entry.
Before you start
You need:
- A Nyria account with at least one connected broker. See Integrations.
- A Telegram account that owns the group or channel where the alerts are posted, or is an admin there who can add admins.
If you don't have those rights in the chat, send the alerts through TradingView or your own bot instead. See the webhook reference for the payload.
Steps
Pick Telegram as the alert source
In Nyria, select Create strategy and pick Telegram as the alert source.
Link your Telegram account
Select Connect Telegram. Telegram opens a chat with @NyriaAlertsBot. Press Start, then tap Link in the bot's reply. The reply names the Nyria account it links, so check that it's yours.
Add Nyria to your group or channel
Back in the strategy form, select Add Nyria to a group or Add Nyria to a channel, then pick the chat in Telegram. Telegram asks you to make Nyria an admin of the group or channel. You need to be the chat's owner, or an admin who can add admins.
On Telegram Web, add @NyriaAlertsBot to the group yourself, then make it an admin.
Nyria asks for one admin right, manage chat. It only reads messages and never posts. It reads the messages posted in the chat after it joins.
Messages that other bots post in a group aren't read. A bot that relays alerts can post them in a channel where Nyria is an admin, or send them through the TradingView or custom webhook source.
Pick the chat and set filters
Pick the group or channel in the strategy form, and Nyria checks that you run it. If the chat carries more than alerts, narrow what Nyria reads with two optional filters.
- Author (optional): only messages whose sender's display name contains this text are read, ignoring case. Use it when several people post in one chat.
- Keyword (optional): only messages containing this text are read, ignoring case. Use it when alerts share the chat with conversation.
The author Nyria sees depends on the chat.
- In a channel, the author is the channel's name, followed by the poster's name only when Sign messages is on. In a channel without signatures, use the keyword filter.
- In a group, an anonymous admin appears as the group's name.
- Anyone who can post in the chat can use any display name, so the author filter doesn't prove who posted.
The keyword filter works as it does for Discord. See the keyword filter.
Check the format on real messages
The strategy's Alert format card previews recent messages from the chat. Nyria can't see messages posted before it joined, so in a new chat the preview starts empty and fills as messages arrive. If Nyria was added by someone whose Telegram isn't connected to Nyria, it keeps the chat's messages from the first time you open the preview, so post your test messages after that. Messages stay in the preview for 7 days.
Pick messages from the preview and assign each one to Long entry, Long exit, Short entry or Short exit. Nyria reads each one and shows what it would have traded. Fix any that read wrong before you go on. The strategy goes live when every trade type it enables has an assigned message Nyria can read.
Deploy a bot
When every sample reads correctly, the strategy shows Active. Select Deploy bot and pick a connected account.
From then on, each message in the chat that passes the author and keyword filters places a trade.
How Nyria reads Telegram messages
Telegram alerts are free text, read the same way as Discord alerts. For example:
SPY long entryClose short BTCAAPL 345C buy to openEvery alert needs a ticker, a direction and an action. See free text on Discord for the shapes Nyria reads. Paste one into the alert tester to check how Nyria would read it before you go live.
With Provided in alert, a Telegram entry with no date, like SPY 780C, takes the nearest listed expiration, as a Discord entry does. That can be today's expiration (0DTE), even late in the day.
Telegram quirks
Late alerts place no new entry
An alert that Nyria handles more than a minute after it was posted, or after a newer message from the chat for the same strategy, places no new entry. A close in it still runs. The strategy log says why.
An alert can pass the one-minute mark when Telegram delivers messages late after an outage, or when Nyria retries an alert it couldn't process. To take the entry, post the alert again.
Edits are not traded
Nyria acts on a message as it was first posted. Editing it later places no order and doesn't change one already placed. To correct an alert, post a new message, or close the position with a normal exit alert.
Nyria keeps checking that you run the chat
Nyria checks the chat when you pick it, when you save or re-activate the strategy, and at least daily otherwise. If Nyria is removed from the chat or loses its admin rights, you stop being the chat's owner or an admin who can add admins, or you disconnect Telegram, the strategy stops reading the chat and you get a notification. The strategy's Integration tab says why. Fix it, then select Check again.
A channel and its discussion group
A channel's posts are also copied into its discussion group, so a strategy on the group reads the channel's posts too. Don't point one strategy at the channel and another at its group, or each alert trades twice.
Messages from before Nyria joined
Telegram doesn't give a bot the messages posted before it joined a chat. To fill the setup preview, Nyria keeps the recent messages of chats in use for 7 days: a chat a strategy reads, a chat added by someone whose Telegram is connected to Nyria, or a chat opened in the preview in the last 7 days. It keeps each sender's display name, not their @username. For any other chat it's in, Nyria records only the chat itself, not its messages.
Troubleshooting
Can't pick the group or channel
Nyria has to be an admin of the chat, and you need to be the chat's owner or an admin who can add admins. The chat then shows up for you, whoever added Nyria. A chat Nyria can't read yet says why under its name.
The preview is empty
Nyria can't see messages posted before it joined the chat. New messages appear in the preview as they arrive. If someone whose Telegram isn't connected to Nyria added it, Nyria keeps messages from the first time you open the preview, so post a test message after that.
The strategy stopped reading the chat
The strategy's Integration tab says why: Nyria was removed from the chat or isn't an admin there, you're no longer the chat's owner or an admin who can add admins, or your Telegram account isn't connected. Fix that in Telegram or in Nyria, then select Check again.
A message didn't trade
- It was edited. Edits are not traded. Post the alert as a new message.
- It arrived late. Nyria handled it more than a minute after it was posted, or after a newer message for the same strategy, so it placed no new entry. The strategy log says so.
- Nyria couldn't process it. When Nyria can't pass an alert on within 10 minutes, it stops retrying and the strategy log says so. Post it again if it still applies.
- Another bot posted it in a group. Nyria doesn't read other bots' messages in a group.
- A filter left it out. Check the author and keyword filters on the strategy.
- Nyria lost access to the chat. See "The strategy stopped reading the chat" above.
Related
- Discord alerts: the message formats Telegram alerts share.
- Webhook reference: send the same alert text in an HTTP request.
- What you can trade: the stock, option and crypto alerts Nyria reads.
- Trading behavior: how entries, exits and multiple entries work after an alert reaches the bot.
Trade alerts from a Discord server you run
Options and stock alerts in a Discord server you run, auto-traded at your broker. Members subscribe and their own bots trade the same calls. Paper is free.
Connect TrendSpider alerts
Send TrendSpider Alerts and Strategy Bot alerts to Nyria as webhooks, with payloads that use TrendSpider's own %alert_symbol% variables.