Skip to content

GalaxyScore

Amargedon edited this page Nov 3, 2023 · 3 revisions

GalaxyScore bot helper named galaxyscore.py

Type = trading pair

What does it do?

It will monitor LunarCrush's GalaxyScores and use the Top X to create pairs for your 3Comma's composite DCA bots to use.

How does it work?

The GalaxyScore Top 10 coins from LunarCrush are downloaded, the base pair of each of the specified 3Comma's bots is determined, from this new pairs are constructed, these are checked against your Blacklist on 3Comma's and the market data on 3Comma's (reflecting Binance or FTX data 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.

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: make sure you specify a 'Trading 24h minimal volume' value in your bot(s), otherwise you can end up with 'shitcoins'. Check the LunarCrush website or galaxyscore.log file after running in debug mode for a while to see which coins and values are retrieved, and decide how much risk you want to take.

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

The configuration file for galaxyscore has the following settings:

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

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

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

  • lc-apikey - your LunarCrush API key value.

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

  • [bot_]

  • maxaltrankscore - set this lower for galaxyscore bot helper so altrank score of coin gets evaluated too. (default is 1500)

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

  • numberofpairs - number of pairs to update your bot(s) with. Set to 0 if you want to have exactly the maximum active deals for each bot as pair amount. (default is 10)

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

  • comment - free field you can use, for example for the name or description of the bot

Example: (keys are bogus)

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

[bot_123456]
maxaltrankscore = 250
mingalaxyscore = 0.0
numberofpairs = 10
originalmaxdeals = 8
allowmaxdealchange = True
allowbotstopstart = True
comment = my great bot

Example output

GalaxyScore