Hello everybody.
Working with version 3.3.2First of all: Thanks a lot for all the tutorials in this forum, they helped me a lot! And of course thanks to Gunthar for this nice bot!
To have a better understanding of the GUNBOT and to have an easy start using it, I created
1. an installer to only use one command to setup GUNBOT 3.3.2 on a fresh virtual server and
2. a generator to init and start all the trade pair configs I want to use.
From creating a new server at DigitalOcean to let the bot start trading it takes less than 5 min.
But:
I'm new to GUNBOT. So my approach has some downsides
- for now Installer:1. The installer only works on Debian / Ubuntu (Choose Ubuntu 16.04.)
2. You need to be root user
3. I recommend a fresh virtual server
Generator:1. Only supports trade pairs BTC to XXX
2. You can only change a few settings of the trade pair config
3. The other settings are predefined and very likely not perfect - but a good start
How does it workInstallerThe installer is basically a bash script. That script will
- update the system (apt upgrade),
- install node 6.x (for the generator and pm2),
- install required tools (yo, pm2, unzip),
- install the GUNBOT 3.3.2,
- creates some handy aliases,
- install the generator
You can view the whole script here:
https://github.com/BeerK0in/generator-gunbot/blob/master/install.shGeneratorThe generator is using a tool called yeoman to create the trade pair config files and optionally starts the GUNBOT for the pairs.
It will ask you some questions you need to answer. Like:
- What market do you want to setup (poloniex, bittrex or kraken)
- Your Market API key
- Your Market API secret
- Max amount of BTC used by each pair per trade
- What BUY strategy do you want to use
- What SELL strategy do you want to use
-
Questions about the selected strategies- Your Delays of the Gunbot
- Select the currencies you want to trade
- Select the trade pair currencies you want to automatically start
And than it creates the config files and starts GUNBOT using pm2.
AliasesThe installer also sets up some aliases to do more with less.
-
gcd: Go to the folder GUNBOT is installed
-
gadd: Use the generator to add a new pair
(*)-
gl: Get a list of all running GUNBOTs
-
glog [botname or id]: Shows the log of the selected bot (botname = BTC_XXX, use gl to get id)
-
gstop [botname or id]: Stops a running bot (botname = BTC_XXX, use gl to get id)
-
gstart [botname or id]: Starts a stopped bot (botname = BTC_XXX, use gl to get id)
(*) For now gadd will use the same settings as defined in the first run of the generator. A next version will allow you to set specific strategies for new trade pairs.Let's do it1. New VPS. (optional)I use DigitalOcean a lot, so I can give a brief tutorial:
- Login
- Create Droplet
- Select Ubuntu
- Select the 512MB RAM option for ~3 running trade pairs, 1GB for ~8 pairs or 2GB for ~17 pairs
- Choose San Francisco 2 as location
- Give it a name like 'my-gunbot'
- Click create
Here is an image of the whole creation page:
https://i.imgur.com/4uxqjBJ.pngNext you get an email with the IP address of the new server and a password. Looks like this:
https://i.imgur.com/LTxIos9.pngUse SSH to connect to this new server:
ssh root@123.123.123.123
- Accept the authenticity of the host (enter "yes")
- Set a new root password
- Done
Looks like this:
https://i.imgur.com/lpsPoYS.pngIf you want to create a VPS at DigitalOcean, you can use this affiliate link to get $10 credit at DigitalOcean:
https://m.do.co/c/fade3d3435baOf course you can use any server you like.
2. InstallerAfter you connected via ssh to your new server (must be running Debian or Ubuntu) just run this command:
curl -qsL https://raw.githubusercontent.com/BeerK0in/generator-gunbot/master/install.sh | bash -- && exec bash
Two minutes later the installer is done.
3. GeneratorNow run this command:
ginit
Enter your Poloniex API key and the secret, answer the questions and you are done.
Hint for 3.3.2: on a machine with 1GB start 8 or less bots.You can run '
gl' to see all GUNBOTs.
=> That's it. Here a screen how it looks like. Depending on your selected strategy and trade pairs, it will look a little bit different.
To access the log of a bot simply enter
glog BTC_LTC
Or the id of that bot. In my example I could also just run '
glog 2'.
Maybe this helps some people to get into the GUNBOT.
Additional scripts"gstop all" and "gstart all" will likely cause 422 or 429 errors on Kraken and Poloniex, so user cw was so kind and wrote two scripts that nicely and safely start and stop all the bots.
You should use them. Please read his post in this thread to add them to your system:
https://gunthy.org/index.php?topic=277.msg2110#msg2110Thanks cw!
Known ErrorsERROR! - There was an error starting GUNBOT for BTC_EXP:
1
There are 2 possible issues.
The easy oneType 'gl' and check if the pair you want to start is already running. Would look like this:
If it is in that list and its state is
online, type 'gstop BTC_XXX' to stop it before you run 'ginit'.
The nasty oneSometimes the PM2 God Deamon got detached from your (root-)user and you will see an empty list if you enter 'gl' BUT if you run 'pgrep -f BTC_XXX' you will see a id a result.
So the Gunbot is running but pm2 does not want to see it.
You need to kill the PM2 God Deamon, and remove the content in ~/.pm2/:
pgrep -f PM2 | xargs kill -9
Wait like 2 to 5 min till all Gunbots also stopped.
Check if there are running Gunbots
pgrep -f gunthy
If the dont stop, also kill them
pgrep -f gunthy | xargs kill -9
Now remove the content of ~/.pm2/
rm -r ~/.pm2/*
And run run 'ginit' again.
BK