Telegram Sender #
The telegram-sender
outcome sends a message to all Telegram chatrooms
whose IDs match the ones that are specified in the configuration.
For this tool to work properly, the Telegram scout has to be configured
as described here.
On top of that, the Telegram bot whose token is used in the Telegram scout’s
configuration must be added as a member to all the chatrooms whose
IDs are used in the telegram-sender
outcome’s configuration.
The telegram-sender
outcome cannot be backtested. More information
about strategy backtesting can be found
here.
Configuration #
{
"type": "telegram-sender",
"context_id": "telegram-sender-id-123",
"description": "a simple outcome",
"chatrooms": [
125348523,
423483274,
765634524
],
"message": "A new order was placed: {{outcomes.order-placer.id}}"
}
-
type
- string
The type of the outcome configuration.Outcome configuration types are described in detail here.
-
context_id
- string (optional; default: unused)
The ID of the outcome that is used when inserting data into the context store.The context data store and its IDs are described in detail here.
-
description
- string (optional; default: unused)
The description of the outcome and its purpose. -
chatrooms
- array of ints
The array of Telegram chatroom IDs. At least one ID must be specified. -
message
- string (context)
The message that is sent to Telegram. It may contain multiple context value placeholders.
Report #
{
"type": "telegram-sender",
"message": "A new order was placed: 34sv0s78ajk0036f3m60"
}
-
type
- string
The type of the outcome report.Outcome report types are described in detail here.
-
message
- string
The message that was sent to Telegram.
If an error occurs during thetelegram-sender
outcome’s execution, onlytype
anderror
properties are added to the report. Theerror
property is described in detail here.
Context #
The objects that the telegram-sender
outcome inserts into the context
store are as follows:
outcomes.<context-id>.message
- string
The message that was sent to Telegram.
If an error occurs during thetelegram-sender
outcome’s execution, only theoutcomes.<context-id>.error
object is inserted into the context store. This context data object is described in detail here.