Skip to content

Watchlist

Amargedon edited this page Nov 3, 2023 · 2 revisions

Watchlist bot helper named watchlist.py

Type = start deal trigger

What does it do?

It will monitor a specific Telegram chat channel (https://t.me/wiseanalize) and sent a 'start new deal' trigger to the linked bot for that pair.

How does it work?

Parse incoming Telegram messages, check the format of message for BTC_xxx or USDT_xxx pairs, it will also change pair to -for example- BUSD_xxx if bot uses a different base coin. The exchange must match the exchange of the bot(s), 3Commas blacklist and market are also checked.

The bot(s) need to have "Manually/API (Bot won't open new trades automatically)" as trigger.

Configuration

The watchlist bot helper config file uses this layout:

  • timezone - timezone. (default is 'Europe/Amsterdam')
  • debug - set to true to enable debug logging to file. (default is False)
  • logrotate - number of days to keep logs. (default = 7)
  • usdt-botids - a list of bot (USDT multipair) id's to use. (can also be using BUSD)
  • btc-botids - a list of bot (BTC multipair) id's to use.
  • numberofpairs - number of pairs to update your bots with. (default is 10)
  • 3c-apikey - your 3Commas API key value.
  • 3c-apisecret - your 3Commas API key secret value.
  • 3c-apikey-path - path to your own generated RSA private key, or empty.
  • tgram-phone-number - your Telegram phone number, needed for first time authorisation code. (session will be cached in watchlist.session)
  • tgram-api-id - your telegram API id.
  • tgram-api-hash - your telegram API hash.
  • tgram-channel - name of the chat channel to monitor.
  • notifications - set to true to enable notifications. (default = False)
  • notify-urls - one or a list of apprise notify urls, each in " " seperated with commas. See Apprise website for more information.

Example: (keys are bogus)

[settings]
timezone = Europe/Amsterdam
debug = False
logrotate = 14
usdt-botids = [ 123456, 129011 ]
btc-botids = [ 789012 ]
3c-apikey = 4mzhnpio6la4h1158ylt2
3c-apisecret = 4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt
3c-apikey-path = 
tgram-phone-number = +316512345678
tgram-api-id = 1234566
tgram-api-hash = o6la4h1158ylt4mzhnpio6la
tgram-channel = mytriggerchannel
notifications = True
notify-urls = [ "tgram://9995888120:BoJPor6opeHyxx5VVZPX-BoJPor6opeHyxx5VVZPX/" ]

Example output

Watchlist

Format

Format of the telegram messages support are:

Trigger bot(s) with start deal asap for this pair

BINANCE
#USDT_BTC
LONG

Close any active deals for the bot(s) configured for this pair:

BINANCE
#USDT_BTC
CLOSE

Or

BINANCE
#USDT_BTC
LONG
CLOSE

Exchange can be 'BINANCE', 'KUCOIN' or 'FTX'