Some 3Commas helper bots, AltRank, GalaxyScore, Watchlist, Auto-Compound

Overview

3Commas Cyber Bot Helpers

A collection of 3Commas bot helpers I wrote. (collection will grow over time)

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

My code is MIT Licensed, read it please.

Always test your setup and settings with your PAPER ACCOUNT first!

Why did you build these bot helpers?

I rather don't want to pay for Monthly services if this is not needed, I rather invest it in crypto. (or Coffee to program) And I also want to learn how things work in the Crypto world.

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

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

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.

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)
  • botids - a list of bot id's to manage separated with commas
  • 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)
  • maxaltrankscore - set this lower for galaxyscore bot helper so altrank score of coin gets evaluated too. (default is 1500)
  • 3c-apikey - Your 3Commas API key value.
  • 3c-apisecret - Your 3Commas API key secret value.
  • 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.

Example: (keys are bogus)

[settings]
timezone = Europe/Amsterdam
timeinterval = 1800
debug = False
logrotate = 14
botids = [ 123456 ]
numberofpairs = 10
maxaltrankscore = 250
3c-apikey = 4mzhnpio6la4h1158ylt2
3c-apisecret = 4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt
lc-apikey = z2cwr88jkyclno8ryj0f
notifications = True
notify-urls = [ "tgram://9995888120:BoJPor6opeHyxx5VVZPX-BoJPor6opeHyxx5VVZPX/" ]

Example output

GalaxyScore

AltRank bot helper named altrank.py

Type = trading pair

What does it do?

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

How does it work?

Same as galaxyscore bot helper except with AltRank data.

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

Configuration

The configuration file for altrank 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)
  • botids - a list of bot id's to manage separated with commas
  • 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)
  • maxaltrankscore - set this lower for galaxyscore bot helper so altrank score of coin gets evaluated too. (default is 1500)
  • 3c-apikey - Your 3Commas API key value.
  • 3c-apisecret - Your 3Commas API key secret value.
  • 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.

Example: (keys are bogus)

[settings]
timezone = Europe/Amsterdam
timeinterval = 1800
debug = False
logrotate = 14
botids = [ 123456 ]
numberofpairs = 10
maxaltrankscore = 250
3c-apikey = 4mzhnpio6la4h1158ylt2
3c-apisecret = 4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt
lc-apikey = z2cwr88jkyclno8ryj0f
notifications = True
notify-urls = [ "tgram://9995888120:BoJPor6opeHyxx5VVZPX-BoJPor6opeHyxx5VVZPX/" ]

Example output

AltRank

Compound bot helper named compound.py

Type = compounder

What does it do?

It will compound profits made by a bot to the BO and SO of the same bot.

How does it work?

Every interval the bots specfied in the config are read, their deals are checked for profits. If profit has been made, the value will be added to the BO and SO values of the bot. Deals are marked as processed and original BO/SO ratio of the bot is stored to be used for next iterations.

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

Configuration

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

  • 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)
  • botids - a list of bot id's to manage separated with commas
  • profittocompound - ratio of profit to compound (1.0 = 100%, 0.85 = 85% etc)
  • 3c-apikey - Your 3Commas API key value.
  • 3c-apisecret - Your 3Commas API key secret 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.

Example: (keys are bogus)

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

Example output

Compound

Watchlist bot helper named watchlist.py

Type = start deal trigger

What does it do?

It will monitor a specific Telegram chat channel 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.
  • 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-botid = 123456
btc-botid = 789012
3c-apikey = 4mzhnpio6la4h1158ylt2
3c-apisecret = 4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt
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

Watchlist bot helper named watchlist_100eyes.py

Type = start deal trigger

What does it do?

It will monitor the Telegram chat channel of the https://www.100-eyes.com/ service (this is a paid service where you can select your own triggers to trigger on) 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.
3Commas blacklist and market are checked for the exchange the bot is connected to.
The bot(s) need to have "Manually/API (Bot won't open new trades automatically)" as tirgger.
It will only react on trigger messages as defined under [triggers] in your ini file, it wil ignore any others. 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.
  • 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.
  • [triggers] - this sections contains a list of trigger texts to trigger deal on (without the [PAIR] in front and everything after (5m) or (15m)

Example: (keys are bogus)

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

[triggers]
Stochastics Oversold  (15m)
Stochastics Oversold  (5m)
Close Below Lower BB  (5m)
Bullish Engulfing + RSI was Oversold  (5m)

Take profit bot helper named tpincrement.py

Type = takeprofit adjuster

What does it do?

It will check active deals for the bot(s) specified and see how many SO are used, depending on number it will add a defined % per safety order to the TP value.

Some notes:

Example setting 'increment-step-scale = [0.1, 0.05, 0.03]' works like this:

Safety order 1 increment is 0.1%
Safety order 2 increment is 0.05%
Safety order 3 increment is 0.03%

Safety orders > 3 are ignored and not adjusted (you can increase the number of steps in the config to cater more safety orders e.g. [0.1, 0.05, 0.03, 0.03, 0.03] will cater for 5 SO)

Upon each update inteval, the safety orders are compared from the last 'run', so no SO are missed, the difference is then calculated. For example, using the above example config:

Update interval 1 = SO's complete is 0, so the increase is 0%
Update interval 2 = SO's complete is 2, so the increase is 0.15%
Update interval 3 = SO's complete is 3, so the increase is 0.03%

Existing deals will be updated on the first initiation of the database - so please take this into account - this is by design. Not yet tested over an extensive period.

All credits for this code go to adzw01 !

Configuration

The configuration file for tpincrement contains 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)
  • botids - a list of bot id's to manage separated with commas
  • increment-step-scale - a list of increment percentages for the safety orders
  • 3c-apikey - Your 3Commas API key value.
  • 3c-apisecret - Your 3Commas API key secret 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.

Example: (keys are bogus)

[settings]
timezone = Europe/Amsterdam
timeinterval = 1800
debug = False
logrotate = 14
usdt-botid = 123456
btc-botid = 789012
3c-apikey = 4mzhnpio6la4h1158ylt2
3c-apisecret = 4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt4mzhnpio6la4h1158ylt
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

Tpincrement

Binance account Setup

  • Create a Binance account (Includes my referral, I'll be super grateful if you use it).
  • Enable Two-factor Authentication.
  • Create a new API key.
  • Get a stable cryptocurrency to trade with.

NOTE: Only needed if you want to trade on Binance, not needed for the functionality of the bot(s).

FTX account Setup

  • Create a FTX account (Includes my referral, I'll be super grateful if you use it).
  • Enable Two-factor Authentication.
  • Create a new API key.
  • Get a stable cryptocurrency to trade with.

NOTE1: Only needed if you want to trade on FTX, not needed for the functionality of the bot(s). NOTE2: When you connect your FTX account to 3Comma's you get free use to trade on FTX, no need to have a 3Commas subscription.

3Commas account Setup

  • Create a 3Commas account (Includes my referral, again I'll be super grateful if you use it).
  • Enable Two-factor Authentication.
  • Connect your 3Commas account with the Binance or FTX exchange using the key values created above.
  • Create a new API key with Bot Read and Bot Write permissions, enther these key in config.py
  • Setup a DCA Bot (details will follow)

NOTE: Needed for the bot(s) to work, duh they are 3Commas bot helpers.

LunarCrush account Setup

Support the Project

  • Create a LunarCrush account
  • Create a new API key and enther these key in config.py as well.

NOTE1: Needed for the bot(s) to work, to download the GalaxyScore and/or AltRank information.

NOTE2: It seems LunarCrush doesn't check for APIKey validity in their requests anymore (noticed this since around 5-Nov-2021) not sure if this is temporary. So you can leave lc-apikey settings the way it is for now.

Bot helper setup

Download and install

You need run Python 3.7 or higher.

Download the zip file of the latest release from here and unpack it, or do a git clone with the steps described below.

$ sudo apt install git
$ git clone https://github.com/cyberjunky/3commas-cyber-bots.git
$ cd 3commas-cyber-bots
$ pip3 install -r requirements.txt

Configuration of the bot helpers

For a new install just start the bot helper you want to use like below for altrank, a config file with the name of bot is created (ending in .ini)

$ python3 ./altrank.py

Then you can edit the file and start the bot helper again to use it.

Look at the helper sections above for each layout and description of the settings.

3Commas API key permissions needed

The 3Commas API need to have 'BotsRead, BotsWrite and AccountsRead' permissions, don't give it more than that to be safe.

Telegram ID, Hash and Secrets explained

There are two sets of Telegram related settings.

Watchlist

One is used by watchlist.py to connect to the telegram API.

To get the Telegram App ID and hash you have to create an application ,

These are the steps as outlined in below link:

  • Login to your Telegram account here with the phone number of the developer account to use.
  • Visit the API development tools
  • A Create new application window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later.
  • Click on Create application at the end. Remember that your API hash is secret and Telegram won’t let you revoke it. Don’t post it anywhere!

Fill these in here inside watchlist.ini:

tgram-api-id = 1234566
tgram-api-hash = o6la4h1158ylt4mzhnpio6la

Notifications

The other set of values are used by to sent notifications to Telegram channel of your choice. I use Apprise for this, all possible platform to send notifications to are described here Apprise website

The Telegram part is described here

  • First you need to create a bot to get a bot_token
  • Open telegram and search for 'BotFather' start a conversation
  • Type: /newbot
  • Answer the questions it asks after doing this (which get the name of it, etc).
  • When you've completed step 2, you will be provided a bot_token that looks something like this: 123456789:alphanumeric_characters.
  • Type /start now in the same dialog box to enable and instantiate your brand new bot.

Fill in the notify-url like this:

notify-urls = [ "tgram://2097657222:AAFSebMCJF6rQ6l46n21280K8y59Mg6w13112w/"]

Now you also need a chat_id, don't worry Apprise can get this for you.

  • First sent a random message to your bot via the Telegram app.
  • Then start one of the bot helpers with above like notify-url setting. and look at the logs, it should contain something like:
2021-11-11 19:39:02,930 - apprise - INFO - Detected Telegram user R (userid=936303417)
2021-11-11 19:39:02,930 - apprise - INFO - Update your Telegram Apprise URL to read: tgram://2...w/%40936302121/?image=False&detect=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
  • Now copy and paste the whole part behind and including the % and paste it behind the notify-url you had configured, to avoid syntax errors you need to put an extra % in between so ...w/%%409... etc...

If you didn't send a message to your bot first this is what the logs show:

2021-11-11 19:35:14,682 - apprise - WARNING - Failed to detect a Telegram user; try sending your bot a message first.
2021-11-11 19:35:14,682 - apprise - WARNING - There were not Telegram chat_ids to notify.

Running the bot helpers

Run Manually

$ python3 ./galaxyscore.py and/or $ python3 ./altrank.py and/or $ python3 ./watchlist.py and/or $ python3 ./compound.py

They also have some command-line options:

./galaxyscore.py -h
usage: galaxyscore.py [-h] [-d DATADIR] [-b BLACKLIST]

Cyberjunky's 3Commas bot helper.

optional arguments:
  -h, --help            show this help message and exit
  -d DATADIR, --datadir DATADIR
                        directory to use for config and logs files
  -b BLACKLIST, --blacklist BLACKLIST
                        local blacklist to use instead of 3Commas's

The blacklist file layout is one pair per line.

Example output for altrank

2021-10-14 19:05:11,922 - altrank - INFO - 3Commas altrank bot helper!
2021-10-14 19:05:11,922 - altrank - INFO - Started at Thursday 19:05:11 14-10-2021
2021-10-14 19:05:11,922 - altrank - INFO - Loaded configuration from 'altrank.ini'
2021-10-14 19:05:11,922 - altrank - INFO - Using PAPER TRADING account mode
2021-10-14 19:05:11,922 - altrank - INFO - Notifications are enabled
2021-10-14 19:05:12,372 - altrank - INFO - Fetched LunarCrush Top X ar OK (50 coins)
2021-10-14 19:05:12,425 - altrank - INFO - Fetched 3Commas pairs blacklist OK (52 pairs)
2021-10-14 19:05:12,478 - altrank - INFO - Finding the best pairs for Binance exchange
2021-10-14 19:05:12,509 - altrank - INFO - Fetched 3Commas market data for binance OK (1262 pairs)
2021-10-14 19:05:12,510 - altrank - INFO - Bot 'BUSD Bull Long AltRank' with id '1234567' is already using the best pairs
2021-10-14 19:05:12,510 - altrank - INFO - Next update in 3600 Seconds at 20:05:12

Start Automatically

Example service files 3commas-galaxyscore-bot.service, 3commas-altrank-bot.service (and 3commas-galaxyscore-env-bot.service, 3commas-altrank-env-bot.service if you use the .env enviroment described above) are provided,. They can all be found in the scripts directory, you need to edit the paths and your user inside them to reflect your install. And install the service you need as describe below.

$ sudo cp scripts/3commas-galaxyscore-bot.service /etc/systemd/system/
$ sudo systemctl start 3commas-galaxyscore-bot.service
$ sudo cp scripts/3commas-altrank-bot.service /etc/systemd/system/
$ sudo systemctl start 3commas-altrank-bot.service

Example on how to enable starting the bot helper(s) at boot:

$ sudo systemctl enable 3commas-galaxyscore-bot.service
$ sudo systemctl enable 3commas-altrank-bot.service

Example on how to disable starting the bot helper(s) at boot:

$ sudo systemctl disable 3commas-galaxyscore-bot.service
$ sudo systemctl disable 3commas-altrank-bot.service

How to check status:

$ systemctl status 3commas-galaxyscore-bot.service 
● 3commas-galaxyscore-bot.service - 3Commas GalaxyScore Daemon
     Loaded: loaded (/etc/systemd/system/3commas-galaxyscore-bot.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-10-14 20:09:43 CEST; 39s ago
   Main PID: 53347 (python3)
      Tasks: 2 (limit: 18361)
     Memory: 29.3M
     CGroup: /system.slice/3commas-galaxyscore-bot.service
             └─53347 /usr/bin/python3 /home/ron/development/3commas-cyber-bots/galaxyscore.py

okt 14 20:09:43 laptop-ubuntu python3[53347]: 2021-10-14 20:09:43,713 - galaxyscore - INFO - Using PAPER TRADING account mode
okt 14 20:09:43 laptop-ubuntu python3[53347]: 2021-10-14 20:09:43,713 - galaxyscore - INFO - Notifications are enabled
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,559 - galaxyscore - INFO - Fetched LunarCrush Top X gs OK (50 coins)
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,637 - galaxyscore - INFO - Fetched 3Commas pairs blacklist OK (52 pairs)
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,721 - galaxyscore - INFO - Finding the best pairs for Binance exchange
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,761 - galaxyscore - INFO - Fetched 3Commas market data for binance OK (1262 pairs)
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,761 - galaxyscore - INFO - Updating your 3Commas bot(s)
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,886 - galaxyscore - INFO - Bot 'BUSD Bull Long TTP - 766 - GalaxyScore' with id '6395939' updated with these pairs:
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,887 - galaxyscore - INFO - ['BUSD_HBAR', 'BUSD_PERP', 'BUSD_RLC', 'BUSD_COTI', 'BUSD_AXS', 'BUSD_QNT', 'BUSD_ETH', 'BUSD_QUICK', 'BUSD_OCEAN', 'BUSD_CRV']
okt 14 20:09:44 laptop-ubuntu python3[53347]: 2021-10-14 20:09:44,887 - galaxyscore - INFO - Next update in 3600 Seconds at 21:11:44

How to check logs:

$ sudo journalctl -u 3commas-galaxyscore-bot.service 

How to edit an already installed service file:

$ sudo systemctl edit --full 3commas-galaxyscore-bot.service 

Need for multiple settings

If you want a set of bots having 20 pairs of AltRank/GalaxyScore and another set use 10, or want to trigger on multiple Telegram channels, you can simply copy the script and use a descriptive name, it will create and use it's own settings file, and logfile... as long as the original name is in the file name.

e.g.
$ cp altrank.py altrank10.py
$ ./altrank10.py 
2021-11-20 13:22:37 - altrank10.py - 3Commas bot helper altrank10!
2021-11-20 13:22:37 - altrank10.py - Started at Saturday 13:22:37 20-11-2021.
2021-11-20 13:22:37 - altrank10.py - Created example config file 'altrank10.ini', edit it and restart the program.

$ cp scripts/3commas-altrank-bot.service script/3commas-altrank10-bot.service
And change ExecStart entryr accordingly

Options for hosting this

  • Intel NUC, install Debian or Ubuntu without GUI. And follow installation steps above.

  • Raspberry Pi, install the Raspberry Pi OS And follow installation steps above.

  • Docker find all settings and documentation here

In the Cloud, if you are willing to store your config files with your API keys in the Cloud, these are some options:

$ git clone https://github.com/cyberjunky/3commas-cyber-bots.git
$ cd 3commas-cyber-bots
$ pip3 install -r requirements.txt

Then you can run any of the scripts. More instructions can be found here https://www.youtube.com/watch?v=NH2PhXYvrWs, if you want to run multiple bot helpers, create another Bash console by clicking on the 'Bash' button again, cd to the 3commas-cyber-bots folder and start the next. Please visit the wiki for more information Wiki PythonAnywhere

  • Google Cloud https://console.cloud.google.com Login with your gmail adress,goto 'Compute Engine', 'VM instances', create You can create a small sized VM, you need to specify your CC details. More instructions can be found here https://www.youtube.com/watch?v=5OL7fu2R4M8 NOTE: From Europe there are no free VM's available as shown in the video, at least I could not find them.

Run from Python Enviroment (optional)

You can use the install script called setup.sh to create this environment. Simply run it as ./setup.sh and you have the options:

usage:
	-i,--install    Install 3commas-cyber-bots from scratch
	-u,--update     Command git pull to update.

It creates a .env python enviroment to install the requirements in, and you can run the scripts from there without cluttering your machine.

Before running any of the scripts manually enter the virtual environment first

cd 3commas-cyber-bots
source .env/bin/activate

TODO

  • You tell me, I'm open for ideas and requests!

FAQ

  1. I get this when I try to start the bot:
Traceback (most recent call last):
  File "./galaxyscore.py", line 7, in <module>
    from py3cw.request import Py3CW
ModuleNotFoundError: No module named 'py3cw'

Install the python requirements like so:

$ pip3 install -r requirements.txt

Or run setup.sh script to install the Python environent with everything in it.

  1. I get this error:
Fetching 3Commas pairs blacklist failed with error: {'error': True, 'msg': 'Other error occurred: api_key_invalid_or_expired Unauthorized. Invalid or expired api key. None.'}

Something is wrong with your 3Commas API keys, check the API key values in your config.ini file, you can paste them there without the " "

  1. I get this error:
  File "/usr/lib/python3.7/logging/init.py", line 1121, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/3commas-cyber-bots/logs/galaxyscore.log'

Create the 'logs' directory inside the bot folder.

  1. I use telegram notifications and get the message:
Detected Telegram user R (userid=123456789)
2021-10-13 21:20:05,573 INFO - Update your Telegram Apprise URL to read: tgram://2...w/%123456789/?image=False&detect=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes

Apply the part behind and including the % to your tgram url in the config, but add another % infront of the % to suppress parse errors like this:

   raise InterpolationSyntaxError(
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%123456789/?image=False&detect=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes" ]'

So it looks something like this: (strings are bogus)

notify-urls = [ "tgram://9995888120:BoJPor6opeHyxx5VVZPX-BoJPor6opeHyxx5VVZPX/%%123456789/?image=False&detect=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes" ]
  1. I get this error running pip3 install step:
       #include <ffi.h>
                ^~~~~~~
      compilation terminated.
      error: command 'x86_64-linux-gnu-gcc' failed with exit status 

Install libffi-dev with sudo apt install libffi-dev and try again.

  1. I get error 'can't find Rust compiler':

Update pip3 like so:

$ pip3 install --upgrade pip

And try again.

  1. After running the watchlist.py script for a few days, the following errors sometimes shows up in the logs:
Error occurred while triggering start_new_deal bot 'Bot name' error: Other error occurred: Unknown error occurred#Exceptions::OpenDealPresentForThisPair None None.

This happens when your bot is in a paper trade account, watchlist will then ignore the exchange field in the trigger, so when two of the same pairs for different exchanges are triggered, you get the same pair twice, and 3Commas tells you that you already have a trade for this pair, this only happens in paper mode.

  1. I get error 'TypeError: object of type 'int' has no len()'
  File "./*.py", line 511, in callback
    if len(botids) == 0:
TypeError: object of type 'int' has no len()

Make sure usdt-botids and btc-botids are defined within [] in your ini files.

  1. I get error for account in data: TypeError: 'NoneType' object is not iterable
  File "./*.py", line 250, in get_threecommas_account
    for account in data:
TypeError: 'NoneType' object is not iterable

Newer versions of the scripts also need AccountRead permissions for the 3Commas API Keys. Create new ones, with it and paste them in your ini file(s)

Debugging

Set debug to True in config.ini and check the appropriate log file under logs/ for debug information

debug = True

Donate

If you enjoyed this project -and want to support further improvement and development- consider sending a small donation using the PayPal button or one of the Crypto Wallets below. ✌️

Wallets:

  • USDT (TRC20): TEQPsmmWbmjTdbufxkJvkbiVHhmL6YWK6R

  • USDT (ERC20): 0x73b41c3996315e921cb38d5d1bca13502bd72fe5

  • BTC (BTC) : 18igByUc1W2PVdP7Z6MFm2XeQMCtfVZJw4

  • BTC (ERC20) : 0x73b41c3996315e921cb38d5d1bca13502bd72fe5

Or at least join my Pi mining team, it's free:

1π! Pi is a new digital currency developed by Stanford PhDs, with over 25 million members worldwide. To claim your Pi, follow this link https://minepi.com/cyberjunky and use my username (cyberjunky) as your invitation code.

Disclamer (Reminder)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

My code is MIT Licensed, read it please.

Always test your settings with your PAPER ACCOUNT first!

Comments
  • Error fetching 3Commas price

    Error fetching 3Commas price

    Describe the bug When using altrank.py script, fetching BTC price from 3commas fails on:

    2022-11-03 10:44:36 - altrank - INFO - 3C Cyber Bot-Helper altrank
    2022-11-03 10:44:36 - altrank - INFO - Started on Thursday 10:44:36 2022-11-03
    2022-11-03 10:44:36 - altrank - INFO - Notifications are enabled
    2022-11-03 10:44:36 - altrank - INFO - Loaded configuration from '/root/3commas-cyber-bots/altrank.ini'
    2022-11-03 10:44:36 - altrank - INFO - Reloaded configuration from '/root/3commas-cyber-bots/altrank.ini'
    2022-11-03 10:44:36 - altrank - INFO - Fetched 3Commas pairs blacklist OK (7 pairs)
    2022-11-03 10:44:36 - altrank - INFO - Fetched 3Commas price OK (20311.34)
    Traceback (most recent call last):
      File ".../3commas-cyber-bots/./altrank.py", line 360, in <module>
        usdtbtcprice = get_threecommas_btcusd(logger, api)
      File ".../3commas-cyber-bots/helpers/threecommas.py", line 74, in get_threecommas_btcusd
        if isnan(price):
    TypeError: must be real number, not str
    

    To Reproduce

    • git pull to get latest version
    • instal missing requirements if any
    • run altrank.py

    Expected behavior Should run flawlessly

    Environment:

    • Python version: 3.9.7
    • Operating System: Ubuntu
    • Version of software: latest

    How to fix I simply fixed the script by adding typecheck and converting string to float (I am not a python developer TBH): File: helpers/threecommas.py Edit:

    ...
    if data:
        price = data["last"]
        logger.info(f"Fetched 3Commas price OK ({price})")
        if isinstance(price, str): # <-- NEW CODE
            price = float(price)   # <-- NEW CODE
    else:
    ...
    
    bug 
    opened by Gh61 30
  • Movecontract on ftx

    Movecontract on ftx

    Hey first of all thank you verry much for all the great bothelpers. it really makes my life better;) i discovered move contracts on ftx, where you can trade the volatility. And i would like to try different strategies on those contracts. the problem is they expire every day so there is a new contract for every day. it is quite annoying to change every single 3commas bot pairs every day. i am a total noob when it comes to python. however i am learning. if this is something people could benefit from it would be nice if there was a "movecontractupdater.py".

    thank you very much

    enhancement 
    opened by usamike25 24
  • Bug or API issues? (altrank / galaxyscore script) - Reopened

    Bug or API issues? (altrank / galaxyscore script) - Reopened

    Hi guys, sorry to be annoying again. I'm on your side But there is an error that I don't know if it's already an API error or a bug in the altrank and galaxyscore script encoding I haven't used these scripts for a long time since I used botassistexplorer but for some reason this script got stuck and doesn't renew the coins in the altrank list (3c-tools error, not the script) I did a clean install of the script installing helper requirements and the error persists.

    image

    04:45 ~/3commas-cyber-bots (main)$ ./galaxyscore.py
    2022-11-02 04:45:44 - galaxyscore - INFO - 3C Cyber Bot-Helper galaxyscore 2022-11-02 04:45:44 - galaxyscore - INFO - Started on Wednesday 04:45:44 2022-11-02 2022-11-02 04:45:44 - galaxyscore - INFO - Notifications are disabled 2022-11-02 04:45:44 - galaxyscore - INFO - Created example config file '/home/droidg/3commas-cyber-bots/galaxyscore.ini', edit it and restart the program 04:45 ~/3commas-cyber-bots (main)$ ^C 04:46 ~/3commas-cyber-bots (main)$ ./galaxyscore.py 2022-11-02 05:47:11 - galaxyscore - INFO - 3C Cyber Bot-Helper galaxyscore 2022-11-02 05:47:11 - galaxyscore - INFO - Started on Wednesday 05:47:11 2022-11-02 2022-11-02 05:47:11 - galaxyscore - INFO - Notifications are disabled 2022-11-02 05:47:11 - galaxyscore - INFO - Loaded configuration from '/home/droidg/3commas-cyber-bots/galaxyscore.ini' 2022-11-02 05:47:11 - galaxyscore - INFO - Reloaded configuration from '/home/droidg/3commas-cyber-bots/galaxyscore.ini' 2022-11-02 05:47:11 - galaxyscore - INFO - Fetched 3Commas pairs blacklist OK (0 pairs) 2022-11-02 05:47:11 - galaxyscore - INFO - Fetched 3Commas price OK (20522.48) Traceback (most recent call last): File "/home/droidg/3commas-cyber-bots/./galaxyscore.py", line 372, in usdtbtcprice = get_threecommas_btcusd(logger, api) File "/home/droidg/3commas-cyber-bots/helpers/threecommas.py", line 74, in get_threecommas_btcusd if isnan(price): TypeError: must be real number, not str 04:47 ~/3commas-cyber-bots (main)$ ./altrank.py
    2022-11-02 04:48:25 - altrank - INFO - 3C Cyber Bot-Helper altrank 2022-11-02 04:48:25 - altrank - INFO - Started on Wednesday 04:48:25 2022-11-02 2022-11-02 04:48:25 - altrank - INFO - Notifications are disabled 2022-11-02 04:48:25 - altrank - INFO - Created example config file '/home/droidg/3commas-cyber-bots/altrank.ini', edit it and restart the program 04:48 ~/3commas-cyber-bots (main)$ ./altrank.py 2022-11-02 05:50:35 - altrank - INFO - 3C Cyber Bot-Helper altrank 2022-11-02 05:50:35 - altrank - INFO - Started on Wednesday 05:50:35 2022-11-02 2022-11-02 05:50:35 - altrank - INFO - Notifications are disabled 2022-11-02 05:50:35 - altrank - INFO - Loaded configuration from '/home/droidg/3commas-cyber-bots/altrank.ini' 2022-11-02 05:50:35 - altrank - INFO - Reloaded configuration from '/home/droidg/3commas-cyber-bots/altrank.ini' 2022-11-02 05:50:35 - altrank - INFO - Fetched 3Commas pairs blacklist OK (0 pairs) 2022-11-02 05:50:35 - altrank - INFO - Fetched 3Commas price OK (20520.29) Traceback (most recent call last): File "/home/droidg/3commas-cyber-bots/./altrank.py", line 360, in usdtbtcprice = get_threecommas_btcusd(logger, api) File "/home/droidg/3commas-cyber-bots/helpers/threecommas.py", line 74, in get_threecommas_btcusd if isnan(price): TypeError: must be real number, not str 04:50 ~/3commas-cyber-bots (main)$

    Thank you and sorry for my inconvenience. Cheers

    bug 
    opened by dangalv 23
  • Blacklist for futures dont work

    Blacklist for futures dont work

    Hello! first thanks for your work! Now I have to clarify that I have very basic knowledge but something I defend myself. Oh and I hope the translator is understood. The bot works correctly, except for the blacklist in futures. To confirm that I start a new clean task: I delete the previous galaxyscore.ini then I set the blacklist.txt,. And I run the galaxyscore.py again. For example there is a pair in binance futures that was running continuously USDT_NEARUSDT and I had already put it in the blacklist.txt. Unfortunately the native 3commas blacklist does not omit these pairs and the bot places them the same, as my SO and BO is the minimum, the bot does not save the changes and does nothing showing me an insufficient funds error from the 3c-helper, since NEAR It asks for 17 dollars minimum to run. I really don't know how to make the bot skip certain pairs from 3c cyber-bots helper I hope you give me a hand, thank you!

    image

    edit: Solution, correct sintax for futures (old): USDT_BTC USDT_SOL USDT_UNI .... USDT_XXX

    edit2: Now correct sintax (for futures) with the new update (~01/07/22) USDT_BTCUSDT USDT_SOLUSDT USDT_UNIUSDT .... USDT_XXXUSDT

    bug 
    opened by dangalv 19
  • compound.py gives UnicodeEncodeError

    compound.py gives UnicodeEncodeError

    Python gives the following error when running compound.py

    --- Logging error --- Traceback (most recent call last): File "C:\Program Files (x86)\Python38-32\lib\logging_init_.py", line 1084, in emit stream.write(msg + self.terminator) File "C:\Program Files (x86)\Python38-32\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u20bf' in position 54: character maps to Call stack: File "compound.py", line 541, in compound_bot(botdata) File "compound.py", line 413, in compound_bot update_bot( File "compound.py", line 300, in update_bot logger.info( File "compound.py", line 167, in info self.log(message, "info") File "compound.py", line 157, in log self.my_logger.info(message)

    bug 
    opened by bramjekel 19
  • Dynamic Max Active Deals modification when updating coin pairs + GalaxyScore threshold

    Dynamic Max Active Deals modification when updating coin pairs + GalaxyScore threshold

    Is your feature request related to a problem? Please describe. Here's one problematic situation: suppose you want to update your coin pairs with AltRank, but you only want to get top20 pairs (because you might get from experience that below that threshold you really don't get good performances). Suppose that due to some restrictions (available pairs on your exchange + blacklisted coins) you end up cutting off the top20 AltRank list down to a number of coins which is below your bot's "Max active deals" number. In this case the script will fail telling you that your "Max active deals" number must be below or equal to your suitable pairs list's length. No update is then performed.

    Describe the solution you'd like In my opinion, a possible solution would be the following. Set an if condition and when the "restricted-suitable-pairs" list is shorter than expected from "Max active deals" original setting, just set "Max active deals" equal to its length (or any similar solution to always impose "Max active deals" matching "restricted-suitable-pairs" length, but only if this length is lower than the original - this is a conservative approach -). I believe this is pretty straightforward to do with a little modification in routine set_threecommas_bot_pairs inside helpers/threecommas.py.

    Describe alternatives you've considered If this was done, then it would be more viable to build a GalaxyScore threshold parameter (for example: update list of coins with just coins from GalaxyScore >= 70). There might be bad market days in which GalaxyScore is low for any coin and even if one coin is the top 1 in GalaxyScore we still don't want to use it as its absolute metric is bad. This would be a strong update to GalaxyScore helper which can't be done instead with AltRank helper as AltRank is just a relative metric and not an absolute one.

    Additional context Screenshot from error related to the case described in the first section: image

    enhancement 
    opened by MassimoCarpita 15
  • Galaxyscore.py with paperaccount - error: Fetching 3Commas account failed

    Galaxyscore.py with paperaccount - error: Fetching 3Commas account failed

    Describe the bug Hello, First of all thank you for sharing this amazing tools!

    I tried to use galaxyscore.py using docker with paper account on 3 commas. When I start the container, I get this error message:

    2021-12-20 11:03:28 - galaxyscore.py - 3Commas bot helper galaxyscore!
    
    2021-12-20 11:03:28 - galaxyscore.py - Started at Monday 11:03:28 20-12-2021
    
    2021-12-20 11:03:28 - galaxyscore.py - Loaded configuration from 'config/galaxyscore.ini'
    
    2021-12-20 11:03:28 - galaxyscore.py - Notifications are enabled
    
    2021-12-20 11:03:28 - galaxyscore.py - Reloaded configuration from 'config/galaxyscore.ini'
    
    2021-12-20 11:03:28 - galaxyscore.py - Fetched 3Commas pairs blacklist OK (0 pairs)
    
    2021-12-20 11:03:28 - galaxyscore.py - Fetched 3Commas BTC price OK (45938.02 USDT)
    
    2021-12-20 11:03:29 - galaxyscore.py - Fetched LunarCrush ranking OK (100 coins)
    
    2021-12-20 11:03:29 - galaxyscore.py - Bot base currency: USDT
    
    2021-12-20 11:03:29 - galaxyscore.py - Bot minimal 24h BTC volume: 0.0
    
    Traceback (most recent call last):
    
      File "galaxyscore.py", line 651, in <module>
    
        find_pairs(botdata)
    
      File "galaxyscore.py", line 430, in find_pairs
    
        marketcode = get_threecommas_account(thebot["account_id"])
    
      File "galaxyscore.py", line 309, in get_threecommas_account
    
        logger.error("Fetching 3Commas account failed with error: %s" % error["msg"])
    
    KeyError: 'msg'
    

    Environment:

    • Python version: v 3.9.9
    • Operating System: Windows 10 + Docker Destop v4.3.0

    Additional context I am using paper account on 3 commas

    Thanks for your help

    bug 
    opened by mthad 13
  • I can't get the top coin to turn on the bot

    I can't get the top coin to turn on the bot

    I don't understand how to make the lunarcrush top coin make the bot turn on. My setup:

    image

    the bot changes the currency but does not turn on the bot: image

    image

    any help please?

    bug 
    opened by dangalv 12
  • Some problems with the new compound script

    Some problems with the new compound script

    Hello again! First I'm going to share some problems that I noticed with the new update of the compound script. The first notable one is the following, the script says the bot's earnings and settings, but then doesn't proceed to apply the new BO and SO values to my bot. I tried the old version of the script (I do backups) and it works, but the new version gives the following error:

    Logs:

    Q1: 2022-10-10 03:29:57 - compound - INFO - 3C Cyber Bot-Helper compound 2022-10-10 03:29:57 - compound - INFO - Started on Monday 03:29:57 2022-10-10 2022-10-10 03:29:57 - compound - INFO - Notifications are disabled 2022-10-10 03:29:57 - compound - INFO - Created example config file '/home/ubuntu/3commas-cyber-bots/compound.ini', edit it and restart the program 2022-10-10 05:58:35 - compound - INFO - 3C Cyber Bot-Helper compound 2022-10-10 05:58:35 - compound - INFO - Started on Monday 05:58:35 2022-10-10 2022-10-10 05:58:35 - compound - INFO - Notifications are disabled 2022-10-10 05:58:35 - compound - INFO - Created example config file '/home/ubuntu/3commas-cyber-bots/compound.ini', edit it and restart the program 2022-10-10 08:01:46 - compound - INFO - 3C Cyber Bot-Helper compound 2022-10-10 08:01:46 - compound - INFO - Started on Monday 08:01:46 2022-10-10 2022-10-10 08:01:46 - compound - INFO - Notifications are disabled 2022-10-10 08:01:46 - compound - INFO - Loaded configuration from '/home/ubuntu/3commas-cyber-bots/compound.ini' 2022-10-10 08:01:46 - compound - INFO - Database '/home/ubuntu/3commas-cyber-bots/compound.sqlite3' created successfully 2022-10-10 08:01:46 - compound - INFO - Database tables created successfully 2022-10-10 08:01:46 - compound - INFO - Reloaded configuration from '/home/ubuntu/3commas-cyber-bots/compound.ini' 2022-10-10 08:01:47 - compound - INFO - Finished deals: 28 total profit: 2.032481839999999 2022-10-10 08:01:47 - compound - INFO - Profit available to compound: 2.032481839999999 2022-10-10 08:01:47 - compound - INFO - Profit available after applying percentage value (0.07): 0.14227372879999994 2022-10-10 08:01:47 - compound - INFO - Current bot settings : 2022-10-10 08:01:47 - compound - INFO - Base order volume : 5.0 2022-10-10 08:01:47 - compound - INFO - Safety order volume : 5.0 2022-10-10 08:01:47 - compound - INFO - Max active deals : 2 2022-10-10 08:01:47 - compound - INFO - Max safety orders : 5 2022-10-10 08:01:47 - compound - INFO - SO volume scale : 1.2 2022-10-10 08:01:47 - compound - INFO - Leverage type : cross 2022-10-10 08:01:47 - compound - INFO - Leverage custom value : 20.0 2022-10-10 08:01:47 - compound - INFO - BO percentage: 11.846095526914329 2022-10-10 08:01:47 - compound - INFO - SO percentage: 88.15390447308567 2022-10-10 08:01:47 - compound - INFO - BO compound value: 0.16853881823351016 2022-10-10 08:01:47 - compound - INFO - SO compound value: 0.16853881823351016 Traceback (most recent call last): File "/home/ubuntu/3commas-cyber-bots/./compound.py", line 870, in compound_bot(config, botdata) File "/home/ubuntu/3commas-cyber-bots/./compound.py", line 715, in compound_bot update_bot_order_volumes( File "/home/ubuntu/3commas-cyber-bots/./compound.py", line 151, in update_bot_order_volumes db_lastpassupdate = cursor.execute( TypeError: 'NoneType' object is not subscriptable A1: JavaScript

    Secondly as feedback and possible future improvements to the script.

    For example in the previous script of compound.py I noticed a problem. I have a futures bot with 2 maximum deals of which it only uses 1 Safety order, it is a cheap, fast bot with a stop loss. So if the bot hit stop loss or time out theoretically it should subtract me from the BO and the SO, it does that but not in the way it should, from that bot I won for example 2 dollars with a 20 USDT BO/SO and then those 2 USDT I lost them, but the bot was not left with 20 dollars again, its left with an extra approximate 0.9 USDT~ instead of 20 usdt. Theoretically and logically it should have returned to 20 usdt right?

    edit: Possible solution but cumbersome, to resolve the true value that the bot's BO/SO should have, you should delete the sqlite3 file, then reset your BO/SO to initial values and restart the script, this will again recalculate the actual value that should have in the imbalance cases on the value of the orders. But it is a somewhat forced solution.

    Another thing, I put these values the same depending on the percentage that I want it to compose, I know the function they fulfill, but I don't know why they separate it into 2 different lines, does it differ in something if they are modified differently?

    default-profittocompound = X profittocompound = X

    Excuse my grammar, I use a translator, I'm not ashamed to say it, any detail that has not been understood please ask me. I hope you can consider a possible solution. Thank you

    bug 
    opened by dangalv 11
  • Error: record_invalid Invalid parameters {'max_active_deals'

    Error: record_invalid Invalid parameters {'max_active_deals'

    My bot had already some activity on it. Max active deals present (20). Started the Galaxyrank bot and changed to 25 in 3Commas. 15 pair max in galaxyrank.ini Start and update were fine. After first hour the update of pairs is fine, but at the end an error is thrown (BOTID replaced with xxx):

    2021-11-15 22:18:31 - galaxyscore.py - DEBUG - These pairs are invalid on the 'Binance' market according to 3Commas and were skipped: ['BUSD_BLOK2', 'BUSD_KCS', 'BUSD_RNDR', 'BUSD_POWR', 'BUSD_CSPR', 'BUSD_VRA', 'BUSD_PIT', 'BUSD_CRO', 'BUSD_MIX', 'BUSD_BLZ']
    2021-11-15 22:18:31 - galaxyscore.py - DEBUG - Current pairs: ['BUSD_BAT', 'BUSD_FLOW', 'BUSD_INJ', 'BUSD_MATIC', 'BUSD_NANO', 'BUSD_ONE', 'BUSD_QNT', 'BUSD_SKL', 'BUSD_STX', 'BUSD_SXP', 'BUSD_SYS', 'BUSD_TRX', 'BUSD_UTK', 'BUSD_XRP', 'BUSD_XTZ']
    New pairs: ['BUSD_NANO', 'BUSD_SYS', 'BUSD_POLY', 'BUSD_QNT', 'BUSD_XLM', 'BUSD_FLOW', 'BUSD_UTK', 'BUSD_SXP', 'BUSD_ANT', 'BUSD_SOL', 'BUSD_STX', 'BUSD_AVAX']
    2021-11-15 22:18:31 - connectionpool.py - DEBUG - https://api.3commas.io:443 "PATCH /public/api/ver1/bots/xxx/update HTTP/1.1" 400 144
    2021-11-15 22:18:31 - galaxyscore.py - ERROR - Error occurred while updating bot 'BUSD Multi Long Bot' error: Other error occurred: record_invalid Invalid parameters {'max_active_deals': ['must be less than or equal to 24']}.
    2021-11-15 22:18:31 - galaxyscore.py - INFO - Next update in 3450 Seconds at 23:16:01
    
    

    My galaxyrank.ini:

    [settings]
    timeinterval = 3450
    debug = True
    logrotate = 7
    botids = [xxx]
    numberofpairs = 15
    accountmode = real
    
    

    I'm running the latest main version of software (did a GIT PULL just before startup)

    opened by celshof 10
  • Does not work correctly with Binance Futures bot

    Does not work correctly with Binance Futures bot

    Describe the bug A) Running the alt-rank bot on a 3commas futures bot removes all settings related to leverage on the bot B) For some pairs it throws up errors like the following

    ERROR - Error occurred while updating bot 'ALTRANK - Futures' error: Other error occurred: record_invalid Invalid parameters {'pairs': ['No market data for this pair: USDT_WRXUSDT', 'No market data for this pair: USDT_POLSUSDT', 'No market data for this pair: USDT_CKBUSDT']}.

    Those will then need to be blacklisted in 3commas to allow the bot to function again.

    bug 
    opened by tumblewader 9
  • Start/stop bots to optimise account balance use

    Start/stop bots to optimise account balance use

    It would be great for a script to monitor open trades and maximise the maximum active deals.

    For example, you have 100 bots enabled and you only have enough funds to run 10. All the bots stay active until 10 deals are opened. at this point the script disables all the remaining bots. When deals are closed the script then enables more bots to pickup more deals.

    This sort script could allow you to maximise deals with higher funding rather that spread the funds between more bots.

    enhancement 
    opened by grumpydolphin 2
  • additional feature for Altrank script

    additional feature for Altrank script

    would like to ask if possible to add additional criteria of coin selecting for Altrank from Lunarcrush, like select the first X coins but also taking in considration other parameter offered by LC as Market volatility and/or market Cap, etc. Is that would be possible

    Thanks

    enhancement 
    opened by bonjo75 7
  • Change BO percentage

    Change BO percentage

    Is it possible to set the BO vs SO percentage? I would like my buy orders to receive 100% of the compounded profits instead of 50 being split with the safety orders.

    enhancement 
    opened by dominionman 0
  • Request: Automatic Compound and grid modifying

    Request: Automatic Compound and grid modifying

    Hi,

    Great work on this! You've asked for idea's to do.

    What I would like is automatic gridbot management. I do this by hand and consumes a lot of time monitoring this and modifying the grids if it gained and the price moved outside the grid.

    I have 2 ideas:

    • Automatic compounding at a set interval to put the gains back in the grid
    • Follow the price (also at a set interval?) if it got outside the grid settings, but maintain the grid width (with a margin off course)

    Thing to keep in mind: Sometimes you need to stop the grid if modifying it, before accepting the new settings. Not sure this is a 3commas gui problem.

    opened by Ferrox85 5
Releases(0.9.0)
Owner
Ron Klinkien
✨🍦🍪🍫🍩🍡🍮🍨✨
Ron Klinkien
Ein Bot, der Dokumente bei Studydrive möglichst immer online hält

studydrive-altklausuren-bot Ein Bot, der Dokumente bei Studydrive möglichst immer online hält geplante Features: Multiaccount supprt: Es gibt mehrere

henrydatei 1 Jun 04, 2022
Polars-fun - Example notebooks for how to use pola.rs

polars-fun Polars is an awesome Rust DataFrame library with Python language bindings. This repo makes it easy to run Polars code on your local machine

Matthew Powers 2 Jun 28, 2022
Python Business Transactions Library - ContractsPY

Python Business Transactions Library - ContractsPY Declare and define business transactions in Python. Use the contracts library to validate business

Arzu Huseynov 7 Jun 21, 2022
Automatic Video Library Manager for TV Shows

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic. Dependen

1.5k Dec 22, 2022
✖️ Unofficial API of 1337x.to

✖️ Unofficial Python API Wrapper of 1337x This is the unofficial API of 1337x. It supports all proxies of 1337x and almost all functions of 1337x. You

Hemanta Pokharel 71 Dec 26, 2022
The best Fortnite all-in-one lobby bot!

Recommended to use on Python v3.8 stable for bot. FLB The best free Fortnite lobby bot experience! Discord server: PDennSploit Softworks LLC Getting S

Payson Holmes 2 May 11, 2022
Telegram Bot to Connect Strangers

Telegram Bot to Connect Strangers How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOKEN: export TELEGRAM_BOT_TOKEN=your_t

PyTopia 12 Dec 24, 2022
WikiChecker - Repositorio oficial del complemento WikiChecker para NVDA.

WikiChecker Buscador rápido de artículos en Wikipedia. Introducción. El complemento WikiChecker para NVDA permite a los usuarios consultar de forma rá

2 Jan 10, 2022
Bot for automated buying boxes on Binance

V 1.0 Bot for automated buying boxes on Binance В settings.py выставляем свои COOKIE и свой CSRFTOKEN В settings.py для headers выставляем свои параме

Matvey 3 Jan 18, 2022
Google Sheets Python API v4

pygsheets - Google Spreadsheets Python API v4 A simple, intuitive library for google sheets which gets your work done. Features: Open, create, delete

Nithin Murali 1.4k Jan 08, 2023
Unofficial Python API client for Notion.so

notion-py Unofficial Python 3 client for Notion.so API v3. Object-oriented interface (mapping database tables to Python classes/attributes) Automatic

Jamie Alexandre 3.9k Jan 03, 2023
Python SDK for the Buycoins API.

This library provides easy access to the Buycoins API using the Python programming language. It provides all the feature of the API so that you don't need to interact with the API directly. This libr

Musa Rasheed 48 May 04, 2022
A simple Discord Bot that uses the free CryptoCompare API to display cryptocurrency prices

What is this? This is a simple Discord Bot coded in Python that uses the free CryptoCompare API to display cryptocurrency prices Download Use git to c

Kevin 10 Apr 17, 2022
universal messaging & notifications api

Pronounced "boat-shahft" What is botschaft? Botschaft is unified messaging & notifications appliance. Want to text yourself when a long-running task c

Tyler M. Kontra 25 Aug 16, 2022
A script that writes automatic instagram comments under a post

Send automatic messages under a post on instagram Instagram will rate limit you after some time. From there on you can only post 1 comment every 40 se

Maximilian Freitag 3 Apr 28, 2022
BioThings API framework - Making high-performance API for biological annotation data

BioThings SDK Quick Summary BioThings SDK provides a Python-based toolkit to build high-performance data APIs (or web services) from a single data sou

BioThings 39 Jan 04, 2023
Play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat 🧪 Get SESSION_NAME from below: Pyrogram

Sehath Perera 1 Jan 17, 2022
A modular Telegram Python bot running on python3 with a sqlalchemy, redis, telethon.

GilbertAnimeBot A modular Telegram Python bot running on python3 with a sqlalchemy, redis, telethon. How to setup/deploy. Read these notes carefully b

Kishore 1 Jan 23, 2022
A simple message content sniping Discord bot which you can run yourself! Sniping API pulled from isobot and Arch bot

Discord Snipe Bot This is a bot made with the same message content sniping API from isobot and Arch bot. It's default prefix is -, however you can als

notsniped 5 Aug 11, 2022
GUI Pancakeswap V2 and Uniswap V3 trading client (and bot)MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC

GUI Pancakeswap 2 and Uniswap 3 trading client (and bot) (MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC) UPDATE: MUTI TRADE TOKEN ENABLE ,TRADE 1

2 Dec 27, 2021