Telegram notifications

GridBot has a built-in Telegram bot for receiving the following types of notifications:

  • Errors
  • Warnings
  • Trade events (executed trades, placed orders, cancelled orders)
  • Informational messages

To set up notifications via Telegram you need to:

  1. Create Telegram bot
  2. Add the created bot to Telegram accounts
  3. Create Telegram chat
  4. Perform settings

Telegram notification modes

Two operating modes are provided:

  • Notifications about errors, warnings, trading events, informational messages - works depending on general settings and settings of each telegram chat
  • On Demand - works when any message is received from user, provided that notifications are enabled for chat with him/her.

The following information is sent upon request:

  • Status on dd:MM:yyyyy hh:mm:ss - Date and time for which the report is generated
  • Running time dd:hh:mm:ss - Total time of the program since the start days:hours:minutes:seconds
  • COUNTS: Error=NN Warning=NN Trade=NN - general counters of error messages, warnings and trade messages
  • DEALS SELL/BUY: 24h=NNN/NN 7d=NNN/NN 30d=NNN/NN 365d=NN/NN Total=NN/NN - Number of trades to buy/sell on sliding window for last 24 hours, 7 days, 30 days, 365 days and total
  • TRADE PROFIT (USDT): 24h=NNN 7d=NNN 30d=NN 365d=NNN Total=NN All time=NN - Profit from trading without taking into account change of rate in USDT by sliding window for the last 24 hours, 7 days, 30 days, 365 days and Total
  • SUMM (USDT): On start=NNN Now=NN Profit(+)/loss(-)=NN Max profit=NN - Amounts in USDT for all bots at start, now, profit (difference between the sum at start and now), Max profit - hypothetical profit, if the pair's rate is above the upper active grid line. It is necessary for estimation of the chosen profit and making a decision on closing the bot.
  • RANGE STATUS: - Bot trading grid states at the current rate of the symbol

  Unknown= NN - Bots in unknown status (if there is no grid or no order)

  In grid= NN - Bots, whose current rate of the symbol is within the active trading grid

  Up grid= NN - Bots, whose current rate of the symbol is higher than the active trading grid

  Down grid= NN - Bots, whose current rate of the symbol is lower than the active trading grid

  • DAILY PROFIT (USDT): Profit from trading for last 3 days in USDT
  • ACCOUNT BALANCES (USDT): Total balance for all accounts broken down into available balance, order balance and total amount. All expressed in USDT.
  Example message:

 

 

Creating a new telegram bot

The first step is to create a new telegram bot via BotFather

To do this, search for BotFather in the Telegram app's contacts search
And send him the /start command
Next, run the command /newbot and then set the bot name and username. The username must end with «bot». In the case of successful registration should get the API key (token) of the bot

 

Telegram account

After creating a bot in Telegram, add a new account to GridBot


The following actions are available:
  • - Add a new Telegram account to send messages through
  • -Change Telegram account
  • - Delete Telegram account
  • - Verify that your Telegram account is connected
 
When you add a Telegram account, a window will open for specifying basic parameters:

The following fields must be filled out:

  • Name - the name of the telegram account
  • API key - token obtained in Telegram using BotFather
  • Use proxy - the sign of necessity to use a proxy server if direct connection does not work
After adding a Telegram account, you need to restart GridBot, because it is initialized only when you start the application. Until then GridBot will not be able to receive and send messages.

Proxy servers

If a direct connection to Telegram is not possible, we recommend that you enable the use of a proxy server in your Telegram account and create a list of proxy servers. Only SOCK5 proxy servers should be specified.
 
                     
  • - Add new proxy server
  • - Change the selected proxy server
  • - Remove the selected proxy server
  • - Load a list of proxy servers from a file. Upload format - text file, one line - one proxy server defined in format IP:PORT TYPE
  • - Starts checking the entire list of proxy servers
 
When adding a proxy server you need to fill in the following fields:

  • Proxy server type (can be one of 3 options: HTTP, SOCKS5, SOCKS4)
  • Host - name or IP address of the proxy server
  • Port - port number
  • Proxy active - the symbol of the necessity to use this proxy server in work
  • Last date of successful connection (this is set automatically by the proxy, you can reset or change it manually)
  • Last date of unsuccessful connection (this is set automatically by the proxy, you can reset or change it manually)
  • Total successful connections (automatic during proxy, manual can be reset or changed)
  • Total unsuccessful connections (automatically set with the proxy, manual can be reset or changed)
 

 

Telegram chats

A Telegram chat is a communication channel between a specific bot and a specific Telegram user. To add a Telegram chat, find the bot you created in Telegram on behalf of the user and send it any message. When you receive the first message from the user, the Telegram chat will be created.

When you create a chat, all notifications will be disabled to ensure privacy, as any Telegram user can connect to the bot. To start receiving notifications, you need to enable them manually on the desired user by double-clicking the appropriate field.

The chat can only be deleted or its notification settings can be edited.

All settings apply only to future events.

Telegram messages

All messages to be sent are recorded in the database. You can see the history on the tab
 
The "Message query to send" tab displays only those messages that are waiting to be sent.

General settings

On the "Settings" tab, you can control all chats sent via Telegram

The settings on this tab have the highest priority.