Username: Password:

Author Topic: Generator-Gunbot - Setup GUNBOT v3.3.2 in less than 5 minutes (linux)  (Read 213187 times)

Offline MrSparkle

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #20 on: May 22, 2017, 05:54:34 PM »
Thank you! This was just what I was looking for and it's really easy to set up.

I do have a problem though, I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit. I've also tried editing the config files directly, but still no change. I figured it wasn't reloading the configs so I tried to restart the pairs buy using gstop and gstart, but then I run into another problem where I can't start the pair after I stop it..

Offline redindian

  • Rookie
  • *
  • Posts: 13
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #21 on: May 22, 2017, 06:11:47 PM »
Quick question:

The scripts installs 3.2 and then applies several patches. But in the latest release with GUI it says:
"For Linux users: update executable, fixed reported bugs of last week + security margin (thanks CryptoKeeperCanada!)

Thanks to @raffaeledonadono for his contribution to the code of this patch!"

Does this mean the installer does not include the latest fix yet?

I was thinking to update the installer script myself using only the latest release just to be sure...

Offline Hexvenn

  • Rookie
  • *
  • Posts: 3
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #22 on: May 22, 2017, 08:32:36 PM »
Both of monitors are looking absolutely fantastic, looking forward to them. I love running stuff on headless servers and staring at the logs but this is certainly better.

Offline cw

  • Rookie
  • *
  • Banned!
  • Posts: 57
    • View Profile
    • Gunbot University
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #23 on: May 22, 2017, 10:26:20 PM »
Quote
Can you please check again? I'm running the same droplet (2GB) with 16 pairs and my load is at 2% (Stepgain) to 4% (BB).

I checked my CPU again and sure enough, it quieted down a lot.  it's between 1-2%




Cointracking affiliate link (10% discount for you) https://cointracking.info?ref=C937652

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #24 on: May 22, 2017, 11:12:50 PM »
Could it also create a swap virtual RAM, so you could run 50 pairs on a 5$ Setup, instead of just 5.
Not sure about the performance. I would go the easy way and just order a VPS with lots of RAM. Take a look here: https://gunthy.org/index.php?topic=298.0 and https://gunthy.org/index.php?topic=166.0
$7 for 6GB RAM is better than swap virtual RAM I think. :)

I do have a problem though, I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit. I've also tried editing the config files directly, but still no change. I figured it wasn't reloading the configs so I tried to restart the pairs buy using gstop and gstart, but then I run into another problem where I can't start the pair after I stop it..
Hm, 'ginit' should work... I try it my self. I'll come back to you later.
If you enter 'gl', do you see stopped bots? Try
Code: [Select]
gstart BTC_XXX
Does this mean the installer does not include the latest fix yet?

I was thinking to update the installer script myself using only the latest release just to be sure...
I just updated the install and update script. It installs the latest binary files from the GUI version now. Check this post for the update instructions:
https://gunthy.org/index.php?topic=277.msg1422#msg1422


I checked my CPU again and sure enough, it quieted down a lot.  it's between 1-2%
8)

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline MrSparkle

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #25 on: May 23, 2017, 02:17:39 AM »
I do have a problem though, I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit. I've also tried editing the config files directly, but still no change. I figured it wasn't reloading the configs so I tried to restart the pairs buy using gstop and gstart, but then I run into another problem where I can't start the pair after I stop it..
Hm, 'ginit' should work... I try it my self. I'll come back to you later.
If you enter 'gl', do you see stopped bots? Try
Code: [Select]
gstart BTC_XXX
BK

Yeah, it stops the pairs fine, just won't start again. Says process x isn't found. I've tried starting it with BTC_XXX and with the process id

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #26 on: May 23, 2017, 07:55:26 AM »
Yeah, it stops the pairs fine, just won't start again. Says process x isn't found. I've tried starting it with BTC_XXX and with the process id

You can try this, but i guess it will not work:
Code: [Select]
pm2 restart BTC_DASH
If it is not working, remove the process from pm2 and add it again:
Code: [Select]
gcd
pm2 delete BTC_DASH
pm2 start ./gunthy-linuxx64 --name BTC_DASH -- BTC_DASH poloniex

It will get a new id that way.


I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit.
Works for me. I did run 'ginit' again and changed the trading value and all buys after that change using the new value. Do you have any settings in the poloniex-BTC-XXX-config.js (I do not, all is in ALLPAIRS)?


BK
« Last Edit: May 23, 2017, 07:59:23 AM by beer-k0in »
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #27 on: May 23, 2017, 09:26:38 AM »
I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit.
Works for me. I did run 'ginit' again and changed the trading value and all buys after that change using the new value. Do you have any settings in the poloniex-BTC-XXX-config.js (I do not, all is in ALLPAIRS)?

Could be this:
'ginit' does not restart already running bots AND GUNBOT 3.2 does not hot reload config changes in ALLPAIRS AND the generator only modifies ALLPAIRS.

So the quick solution is:
Code: [Select]
gcd
gstop all
ginit

It is not perfect, I know. I'm busy with the monitor right now, but will come back to the generator and improve it. Thanks for all the use cases! :)

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline Xaos

  • Rookie
  • *
  • Posts: 14
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #28 on: May 23, 2017, 10:05:15 AM »
What is "Watching disabled"?    And can it be enabled? If so how?






Hello everybody.

First 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.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.  :D

But:
I'm new to GUNBOT. So my approach has some downsides - for now ;)

Installer:
1. The installer only works on Debian / Ubuntu
2. You need to be root user
3. I recommend a fresh virtual server

Generator:
1. Only supports Poloniex
2. Only supports trade pairs BTC to XXX
3. You can only change a few settings of the trade pair config
4. The other settings are predefined and very likely not perfect - but a good start


How does it work

Installer

The installer is basically a bash script. That script will

- update the system (apt upgrade),
- install node 7.x (for the generator and pm2),
- install required tools (yo, pm2, unzip),
- install the GUNBOT 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.sh

Generator

The 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:

- Your Poloniex API key
- Your Poloniex 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
- 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.

Aliases

The 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)
- gsys: Show free memory and CPU load

(*) 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 it

1. 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.png
Next you get an email with the IP address of the new server and a password. Looks like this: https://i.imgur.com/LTxIos9.png
Use SSH to connect to this new server:

Code: [Select]
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.png

If 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/fade3d3435ba
Of course you can use any server you like.


2. Installer

After you connected via ssh to your new server (must be running Debian or Ubuntu) just run this command:

Code: [Select]
curl -qsL https://raw.githubusercontent.com/BeerK0in/generator-gunbot/master/install.sh | bash -- && exec bash
Two minutes later the installer is done.

3. Generator

Now run this command:

Code: [Select]
ginit
Enter your Poloniex API key and the secret, answer the questions and you are done.
Hint for 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

Code: [Select]
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.
BK

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #29 on: May 23, 2017, 11:27:35 AM »
What is "Watching disabled"?    And can it be enabled? If so how?

http://pm2.keymetrics.io/docs/usage/watch-and-restart/
"PM2 can automatically restart your application when a file is modified in the current directory or its subdirectories"

"can it be enabled?": Sure, you are free to do what ever you want on your server.
"how?": Follow the instructions at http://pm2.keymetrics.io/docs/usage/watch-and-restart/

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

btcjuice

  • Guest
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #30 on: May 23, 2017, 05:21:43 PM »
First of all: Great job mate!

Second: how can we add more pairs after the initial setup?

Third: please release that update you posted a screenshot above, looks awesome :D

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #31 on: May 23, 2017, 05:34:08 PM »
First of all: Great job mate!
Second: how can we add more pairs after the initial setup?
Third: please release that update you posted a screenshot above, looks awesome :D
1. Thx. :)
2. 'gadd' - but it will use the settings you choose in 'ginit'
3. soon. :)
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

btcjuice

  • Guest
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #32 on: May 23, 2017, 06:49:12 PM »
so just had thebad idea of adding a new pair... MY VPS went nuts on CPU power and crashed :(


now i cant start gunbot anymore.. i just get


Code: [Select]
? Select the trade pair currencies you want to automatically start right now: BTS, BURST, CLAM, DASH, DGB, DOGE
identical ALLPAIRS-params.js
identical poloniex-BTC_BTS-config.js
identical poloniex-BTC_BURST-config.js
identical poloniex-BTC_CLAM-config.js
identical poloniex-BTC_DASH-config.js
identical poloniex-BTC_DGB-config.js
identical poloniex-BTC_DOGE-config.js
ERROR! - There was an error starting GUNBOT for BTC_BTS:
1


and when i check the poloniex-BTC_BTS-err.txt file just get

Code: [Select]
::::2017/05/23 13:27:17 Error statusCode 429


Also when typing "gl" none of the pairs show up there anymore... any help?

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #33 on: May 23, 2017, 07:31:26 PM »
so just had thebad idea of adding a new pair... MY VPS went nuts on CPU power and crashed :(

Are you sure the CPU caused the problem?

General info
You need more than 130MB free memory to start a bot. So I guess you have 512MB RAM in your VPS. 6 bots are to much, I recommend 3-4.


any help?

Solution A
Start only one trade pair:
Code: [Select]
gstart BTC_BTS
It should start. Wait 2-3 min and check the available memory:
Code: [Select]
free -m(last column "available")

Check how much memory this trade pair uses via 'gl'.
If it is below 100MB and your available memory is above 130MB, start the next trade pair.

Solution B
Remove all processes from pm2:
Code: [Select]
pm2 delete all
Run 'ginit' again but in the last step, select only 2 or 3 trade pairs.
If they start, check your free memory and if you have more than 130MB, run 'ginit' again and select one pair more. The already started pairs should not be affected by that. (it should work, but I have not tested that case)

BK
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

btcjuice

  • Guest
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #34 on: May 23, 2017, 07:41:48 PM »
I was able to solve this by manually starting them using:

Code: [Select]
pm2 start ./gunthy-linuxx64 --name BTC_DASH -- BTC_DASH poloniex
hope that was the correct way... now all seems ok again...

I have 1 GB somehow the CPU went nuts but now i have 10 pairs and its working fine with 222 delay. (770Mb used of ram)




Offline MrSparkle

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #35 on: May 23, 2017, 07:59:54 PM »
Yeah, it stops the pairs fine, just won't start again. Says process x isn't found. I've tried starting it with BTC_XXX and with the process id

You can try this, but i guess it will not work:
Code: [Select]
pm2 restart BTC_DASH
If it is not working, remove the process from pm2 and add it again:
Code: [Select]
gcd
pm2 delete BTC_DASH
pm2 start ./gunthy-linuxx64 --name BTC_DASH -- BTC_DASH poloniex

It will get a new id that way.


I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit.
Works for me. I did run 'ginit' again and changed the trading value and all buys after that change using the new value. Do you have any settings in the poloniex-BTC-XXX-config.js (I do not, all is in ALLPAIRS)?


BK

My config files have nothing in them except for ALLPAIRS which had a time delay and fail delay. After running ginit again, I tried to manually put in the trade limit, but no go.

I tried:
Code: [Select]
gcd
pm2 delete BTC_DASH
pm2 start ./gunthy-linuxx64 --name BTC_DASH -- BTC_DASH poloniex
Which deleted the pair, and it said it started successfully, but it didn't show up in gl

I'm trying to increase the buy limit without doing the install all over again, but it's not working. I've tried running ginit again and setting the buy limit higher while keeping everything the same, but it still trades with the old limit.
Works for me. I did run 'ginit' again and changed the trading value and all buys after that change using the new value. Do you have any settings in the poloniex-BTC-XXX-config.js (I do not, all is in ALLPAIRS)?

Could be this:
'ginit' does not restart already running bots AND GUNBOT 3.2 does not hot reload config changes in ALLPAIRS AND the generator only modifies ALLPAIRS.

So the quick solution is:
Code: [Select]
gcd
gstop all
ginit

It is not perfect, I know. I'm busy with the monitor right now, but will come back to the generator and improve it. Thanks for all the use cases! :)

BK

I tried:
Code: [Select]
gcd
gstop all
ginit
but I was getting this error


So I gave up and reinstalled the VPS to get a fresh install of your generator and all is fine now. Thanks for the help :P

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #36 on: May 23, 2017, 10:53:46 PM »
Code: [Select]
pm2 start ./gunthy-linuxx64 --name BTC_DASH -- BTC_DASH poloniex
hope that was the correct way... now all seems ok again...

That's exactly how the generator starts the gunbot. So, yes, that's absolutely the correct way!. 8)

I have 1 GB somehow the CPU went nuts but now i have 10 pairs and its working fine with 222 delay. (770Mb used of ram)
Strange... What VPS service do you use?
For less than 10 bots a delay of 100 should be no problem.


but I was getting this error
Hm, somehow the rights to write to the ALLPAIRS file have changed. Thank you for all your input. Will help to make the generator better!

BK
 
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT

Offline MrSparkle

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #37 on: May 24, 2017, 02:59:52 AM »
but I was getting this error
Hm, somehow the rights to write to the ALLPAIRS file have changed. Thank you for all your input. Will help to make the generator better!

BK
[/quote]

Ouuu, glad I can help :)
That's what I thought because I tried to update with the 2022 patch and I unzipped the whole contents instead of the executables which would probably explain why the bots weren't restarting? Forgot to mention that because I did that a few days before trying to change the trade limit lol
So then I tried to run:
Code: [Select]
chmod +x /opt/gunbot/gunthy-*
as a last desperate attempt, but it didn't work so I just started fresh lol

Grimdin

  • Guest
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #38 on: May 24, 2017, 10:51:57 AM »
Great tool but any news about making support for Bittrex & Kraken also?

I could use those also.

Offline beer-k0in

  • Contributor
  • **
  • Posts: 142
  • Beer beer beer
    • View Profile
Re: Generator-Gunbot - Setup GUNBOT in less than 5 minutes (linux)
« Reply #39 on: May 24, 2017, 11:01:42 AM »
Great tool but any news about making support for Bittrex & Kraken also?

Sorry, there is no estimated time right now. I will update this generator in the next 4 weeks and than it will probably support Bittrex & Kraken. But no guaranties. :-\
Gunbot Monitor
Support gmon and send a tip: BTC wallet: 1GJCGZPn6okFefrRjPPWU73XgMrctSW1jT