Gunthy

GUNBOT: The automatic profit generator => Beginners & Help => Topic started by: jroddingham on April 12, 2017, 02:00:37 PM

Title: GUNBOT - Linux Tutorial
Post by: jroddingham on April 12, 2017, 02:00:37 PM
I will assume you've got a working linux machine. VPS, local, whatever. There's already a ton of info on Google about getting that functional. (Gunthar if required we can maybe throw some links in here too, VPS suggestions etc)

OK. First thing you need to do is figure out which distribution you are using. Different versions have different package managers. It won't affect being able to run the gunbot executable. I will give instructions for Debian based distros, and we can append to it with package commands for the others if need be.
You now should be sitting in the home directory of your session.
(http://i.imgur.com/YYDmMBx.png)

Now you need to go grab the zip file containing the latest gunbot goodies. You do this by issuing a 'wget' command, which will copy that file to your home directory.
Open your browser and go to https://github.com/GuntharDeNiro/BTCT/releases
Find the latest one, right click the url and copy it to your clipboard. Go back to your terminal and issue a:

Code: [Select]
jrod@ISHTAR:~$ wget https://github.com/GuntharDeNiro/BTCT/releases/download/Beta2.0.4lin/gunbotv2.0.4_linux_x86_x64.zip(http://i.imgur.com/dARYSJA.png)

This will download the zip file to your home directory. (Gunthar doesn't use tar apparently  ;)) You now need to unzip it. You likely don't have unzip installed, so using the default Debian package manager you would issue this command:

Code: [Select]
jrod@ISHTAR:~$ sudo apt-get install unzip(http://i.imgur.com/ovmkfgg.png)

You will be prompted for your password. Sudo is issued in this type of linux where you are a non-root user. You are telling the shell to run the command with elevated privileges. This is basically a security feature. After installing that package, you can now unzip your files.

Code: [Select]
jrod@ISHTAR:~$ unzip gunbotv2.0.4_linux_x86_x64.zip(http://i.imgur.com/ZRcQVeR.png)

OK, so you've gotten this far. the command 'ls' in linux will list the contents of the directory you're in. Let's do that now.

Code: [Select]
jrod@ISHTAR:~$ ls(http://i.imgur.com/uE3Ljp5.png)

You will see the original file you downloaded, and now a directory that contains everything that was unzipped. Now you need to get into that directory to do a couple more things. The command in linux to change a directory is 'cd' (It's also this in DOS and Windows terminal) You can go back a directory with a 'cd ..' and recall the list directory with 'ls'

Code: [Select]
jrod@ISHTAR:~$ cd gunbotv2.0.4_linux_x86_x64(http://i.imgur.com/UnzljoW.png)

Now, the gunbot file needs to be set to be executable, else you'll get an error about not having permissions to run it. So, let's do that!

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ chmod +x gunbot(http://i.imgur.com/YMXigrb.png)

Now, to run the file from linux terminal it's the name of the file preceded by a './', like this:

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ ./gunbot BTC_DASH
Gunthar has provided that one pair as an example, you will run gunbot executable against each pair you want to run. You will have to use a program called 'screen' or 'tmux' in order to run a session on a remote terminal, and not have it die when you disconnect.  I will give some brief instructions as well as some links on using tmux. Here's what it looks like when running:

(http://i.imgur.com/Eq6cMEm.png?1)

So, tmux. Basically think of this as a container for all your multiple terminal sessions. There are many ways to do this, and Crypto Wally has by far the best implementation (which hopefully he posts at some point) but for now, this will get you something reasonably functional. First a simple google of 'tmux tutorials' will bring you lots of stuff. Videos are out there as well as detailed tutorials. I am going to show you how I currently look at my 14 or so pairs.

You're going to need to install tmux.

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ sudo apt-get install tmux
Run tmux after installing:

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ tmux(http://i.imgur.com/6UlRO5V.png)

This will open up a new window, started in the directory you executed from. You will notice the new line at the bottom showing you the current active window. Tmux is the container in which everything else will nest in. Now, for tmux to know you're issuing a command to it, and not anything else you have to issue a (configurable) command to tell tmux to get ready and follow your godlike commands issued from your fingertips. By default, this is 'ctrl - b'. Here's a handy list of things you can do with tmux: https://gist.github.com/MohamedAlaa/2961058

You have your choice of running multiple full size windows that you can toggle between, or splitting the exiting window into smaller ones that you can see fill all at once. This is a matter of preference, but after a bunch of pairs due to the way the console outputs you can't really see much of what is going on at that point. That's why Wally pipes the output to tee and then reformats it. Anyway...

Here's how it looks if you issue a combination of 'ctrl-b %' commands and 'ctrl-b "' commands.

ctrl-b " splits the screen horizontally:
(http://i.imgur.com/u1XQil3.png)

ctrl-b % splits the active window vertically:
(http://i.imgur.com/7uh3tja.png)

You can move around the windows with a ctrl-b (arrow key), and kill any one of them with a ctrl-b x. Again, take a look at the commands list and play around.

Now, here's what I currently do for better visibility. Instead of a split screen, each command is opened in it's own full window and I can tab between those. You can see by default it's named 'bash' at the bottom, but that's because we haven't done anything. If you run a gunbot session, it will want to be named gunbot. You will want to rename these. You can rename your window with a 'ctrl-b ,' command. The bar at the bottom changes asking you for a new name, like this:

(http://i.imgur.com/RnVnPDc.png)

you can create a new window and rename it with a 'ctrl-b c' to (c)reate the new window and again a 'ctrl-b ,' command to rename it. There's two ways to toggle between the windows within tmux. You can do a 'ctrl-b' followed by the number of the window you're going for, or a 'ctrl-b w' which will bring you an interactive list to switch around.

OK, NOW DON'T FORGET THIS PART!!!

when you are ready to detach from your session, you will want to issue a 'ctrl-b d' for (d)etaching from your session. This will drop you back to your regular shell prompt, you can safely exit your shell/session. When you want to reattach, just issue a simple 'tmux attach' to get back to it. That works easily enough for the single tmux session, if you want to run multiple sessions that's another story.

Next up, you may want to play with the 1000 trades or best currencies. You will need to have the latest version of node installed.

check the version of nodejs you have by running:

Code: [Select]
jrod@ISHTAR:~$ nodejs --version(http://i.imgur.com/etzcfzR.png)

You don't want version 4.2.6, you'll likely need to update. Easiest cleaner way will be to purge your old version, and then curl to install the newer package.

Code: [Select]
jrod@ISHTAR:~$ sudo apt-get purge nodejs-legacy(http://i.imgur.com/bGfzK0W.png)

(http://i.imgur.com/XyGlZzn.png)

Now, curl to get the newer version and prepare to install.

Code: [Select]
jrod@ISHTAR:~$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -(http://i.imgur.com/HQl4mIh.png)

Now, go ahead and intstall nodejs.

Code: [Select]
jrod@ISHTAR:~$ sudo apt-get install nodejs(http://i.imgur.com/HQmhCc4.png)

At this point you can run the 1000 Trades and the Best Currencies apps from within your working folder.

(http://i.imgur.com/wBk3ukH.png)

Also, check this thread: https://gunthy.org/index.php?topic=74.0

It has a very nice way to run all your pairs at once without any fancy screen bash scripts. Well worth the look!

Gunthar already fattened my BTC wallet, but if you're feeling generous and this helped you out, here's my cardboard sign and tip jar wallet:

1ASxHgXRmubH5Mg9Wc4sG5HtcNwSL5kWeD
Title: Re: Linux tutorial
Post by: AlfonseX on April 13, 2017, 12:45:18 AM
Hello,
thanks for this tutorial. It will help. The wiki is no longer up to date.
The "chmod +x" must be include in the README.md, IMO.

tmux is a must have. I like it.

Didn't know about
Code: [Select]
$ node currenciesbut here, on Fedora, it says :
Code: [Select]
Error: Cannot find module '/home/…/gunbotv2.0.3_linux_x86_x64/currencies'no module currencies :<
Title: Re: Linux tutorial
Post by: jroddingham on April 13, 2017, 02:14:29 AM
I am glad it helped. Was the currencies in the 2.0.3b version even? Is there a currencies.js in your folder?
Title: Re: Linux tutorial
Post by: AlfonseX on April 13, 2017, 02:26:17 AM
Resolve.
I update to 2.04 and it's ok.
Thank you.
 :)
Title: Re: Linux tutorial
Post by: strshtr on April 13, 2017, 06:09:28 PM
TMUX cheatsheet

https://gist.github.com/MohamedAlaa/2961058 (https://gist.github.com/MohamedAlaa/2961058)

You can enable mouse support too!
setw -g mode-mouse on
Title: Re: Linux tutorial
Post by: jroddingham on April 14, 2017, 12:50:10 PM
TMUX cheatsheet

https://gist.github.com/MohamedAlaa/2961058 (https://gist.github.com/MohamedAlaa/2961058)

You can enable mouse support too!
setw -g mode-mouse on

I had that link in the tutorial, didn't know about mouse support heh. Interesting.
Title: Re: Linux tutorial
Post by: strshtr on April 14, 2017, 05:02:56 PM
TMUX cheatsheet

https://gist.github.com/MohamedAlaa/2961058 (https://gist.github.com/MohamedAlaa/2961058)

You can enable mouse support too!
setw -g mode-mouse on

I had that link in the tutorial, didn't know about mouse support heh. Interesting.

It's easier for me to resize my panes using the mouse to drag and resize the panes.
Title: Re: GUNBOT - Linux Tutorial
Post by: ozil_m on April 22, 2017, 12:18:19 AM
Hey, thanks for the awesome tutorial. I am unable to run 1000T though. I run the command: 'node 1000trades BTC_XXX' and I make the config file for this pair too as BTC_XXX-config.js. But for some reason the 1000trades.js relies on config.js, especially the CURRENCIES param. I am lost and have tried everything to run this with pm2. Please can you help with this?
Title: Re: GUNBOT - Linux Tutorial
Post by: earendil on April 25, 2017, 02:40:29 AM
Hi ozil_m,
Have you found a way to run 1000trades on linux?
thanks
Title: Re: GUNBOT - Linux Tutorial
Post by: criptonauta on April 25, 2017, 08:07:57 AM
Thanks for the Tuto, J-Rodd  8)

A lot to learn yet but it's already functional and that's what matters ^^
(http://img.ctrlv.in/img/17/04/25/58fef5a3161fa.png)
Title: Re: GUNBOT - Linux Tutorial
Post by: docta on April 30, 2017, 11:35:35 PM
jerod thank you.  thank you thank you thank you thank you thank you!

this is just what i was looking for!  i don't know why it's so difficult for most people to give linux tutorials.  my reasons for never quite learning how to use this OS is tons of noise and not enough points of mental traction (in other words, i'm too stupid to follow their instructions).  seems that either you're already familiar with all the -nix particulars or you're on your own to figure it out lol. 

seriously...thanks
 -KW
Title: Re: GUNBOT - Linux Tutorial
Post by: bney on June 30, 2017, 02:20:26 PM
What is the file name for the current 3.3.2 Poloniex bittrex patch version?
Title: Re: GUNBOT - Linux Tutorial
Post by: AlfonseX on July 01, 2017, 12:10:13 AM
What is the file name for the current 3.3.2 Poloniex bittrex patch version?

Filename is same for all three markets:
Code: [Select]
gunthy-linuxx32or
Code: [Select]
gunthy-linuxx64depends of your system.
Title: Re: GUNBOT - Linux Tutorial
Post by: AI on September 23, 2017, 08:03:49 AM
Is this guide still up to date for 3.3.2?