Skip to content

BotAssistExplorer

Amargedon edited this page Nov 3, 2023 · 4 revisions

3C-tools BotAssistExplorer bot helper named botassistexplorer.py

Type = trading pair

What does it do?

It will fetch the specfied 3C-tools Bot-Assist Top X pairs for your 3Comma's composite DCA bots to use.

How does it work?

The data is gathered from the 3c-tools.com website which is sorted on the type of list requested and the pairs between start-number and end-number are processed. These pairs are not reconstructed but used as they are, after being checked against your Blacklist on 3Comma's (or your optional local blacklist file) and the market data on 3Comma's (reflecting Binance, FTX etc. depending on your exchange) to see if the pairs are valid.

If this is the case -and the current pairs are different than the current ones- the bot(s) are updated. When the number of pairs to update the bot with is lower then the number of active deals configured in the bot, 3C will raise an error. Use the originalmaxdeals as the desired number of active deals, and set allowmaxdealchange to True to indicate this script may lower the max number of active deals to the number of pairs the bot is being updated with. This will prevent 3C raising an error, and when more pairs are available the max number of active deals will be increased to originalmaxdeals.

After this the bot helper will sleep for the set interval time, after which it will repeat these steps.

This script can be used for multiple bots with different Top X lists by creating multiple botassist_ sections in the configuration file. For each section bot-assist data is fetched and processed as described above. Make sure each section starts with botassist_ between the square brackets, what follows does not matter and can be used to give a descriptive name for yourself.

When the SHAREDIR option is used, this script will try to read a .pairexclude file for each configured bot. If a pair is listed in the file it will be excluded from the pairs before updating the bot. This can be usefull when also using the DealCluster script in parallel with this script.

3Commas does not allow a bot without trading pairs, however, based on the configuration and market an empty list can be the result. Enable allowmaxdealchange and allowbotstopstart to decrease the number of active deals, or stop the bot when no pairs are available. When the bot is stopped, and there are pairs available again, it will be started.

Note: the 'Trading 24h minimal volume' value in your bot(s) can be used to prevent deals with low volume. Random pairs can be excluded using the blacklist. The first top pairs (like BTC and ETH) can also be excluded by increasing the start-number.

Note: when you want to have more control over your data, or have more filtering options to determine which pairs should be set in your bot, use the MarketCollector and BotUpdater scripts.

Configuration

This is the layout of the config file used by the botassistexplorer.py bot helper:

  • [settings]

  • timezone - timezone. (default is 'Europe/Amsterdam')

  • timeinterval - update timeinterval in Seconds. (default is 86400)

  • debug - set to true to enable debug logging to file. (default is False)

  • logrotate - number of days to keep logs. (default = 7)

  • 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.

  • 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.

  • [botassist_]

  • botids - a list of bot id's to manage separated with commas

  • start-number - start number for the pairs to request (exclude first x). (default is 1)

  • end-number - end number for the pairs to request. (default is 200)

  • mingalaxyscore - minimum galaxyscore of the coin. (default is 0.0)

  • maxaltrankscore - maximum altrankscore of the coin. (default is 1500)

  • originalmaxdeals - the max number of active deals you want to have in your bot.

  • allowmaxdealchange - indicates if the max number of active deals in the bot may be changed to a lower value.

  • allowbotstopstart - indicates if the bot may be stopped when there are zero trading pairs, and may be started when there are trading pairs again.

  • maxvolatility - max volatility percentage allowed for a pair (if this data is available in the configured list)

  • allowpairconversion - try to convert pairs, for example when using a futures list on a spot bot (make sure to check the pairs and monitor for a while!)

  • list - the part behind the 'list=' parameter in the url of 3c-tools bot-assist-explorer, you can find it here: https://www.3c-tools.com/markets/bot-assist-explorer

Example: (keys are bogus)

[settings]
timezone = Europe/Amsterdam
timeinterval = 3600
debug = False
logrotate = 14
3c-apikey = 4mzhnpio6la4h1158ylt2
3c-apisecret = 4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt
3c-apikey-path = 
notifications = True
notify-urls = [ "tgram://9995888120:BoJPor6opeHyxx5VVZPX-BoJPor6opeHyxx5VVZPX/" ]

[botassist_somename]
botids = [ 123456 ]
start-number = 1
end-number = 200
mingalaxyscore = 0.0
maxaltrankscore = 1500
originalmaxdeals = 8
allowmaxdealchange = True
allowbotstopstart = True
maxvolatility = 10.0
allowpairconversion = False
list = binance_spot_usdt_winner_60m

Some examples of the lists available:

  • binance_futures_usdt_alt_rank
  • binance_spot_usdt_highest_volatility_day
  • ftx_spot_usdt_galaxy_score_rank
  • paper_trading_spot_usdt_alt_rank_entered_top_ten

NOTE: For lists with AltRank and/or GalaxyScore, the first pair doesn't have to be the number 1 AltRank coin because not all pair combinations are available on all exchanges.

Example output

BotAssistExplorer