Username: Password:

Author Topic: Gunbot 7.0.2 How to use 2 exchanges in the same bot?  (Read 10115 times)

Offline arranka

  • Rookie
  • *
  • Posts: 23
    • View Profile
Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« on: December 23, 2017, 04:43:09 AM »
I was looking for the forum and I could not find information.

How to do to use 2 exchanges, for example poloniex and bittrex in the same bot?
I have seen that packages with several licenses are offered, but nowhere is it explained how to make the 2

install an extrategia for bittrex and another extrategia for poloniex with your currency pairs
when you go to dashboard you press in preview and then in run
the exchange works well
when I'm going to put the second exchange, again dashboard preview then run
the first exchange stops working and now the second one works
I go to setup I look for the first exchange and I make it work but now the second one stops doing it

that is, the 2 exchanges can not work at the same time
or works poloniex or works bittrex
the 2 at the same time do not work

what am I doing wrong?

Thanks in advance
« Last Edit: December 26, 2017, 08:43:23 PM by arranka »

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.1 How to use 2 exchanges in the same bot?
« Reply #1 on: December 23, 2017, 11:27:12 AM »
this is quite advanced. two gunbots can not run over the same port. it is mentioned in the wiki.

Advanced Gunbot usage
Thanks to community feedback, Gunbot is extendable with tools from many third party devs.

Such tools will usually either interact with Gunbot over websockets, or by providing a config.js for Gunbot to load. When config.js is being overwritten, Gunbot will automatically pick up the changes, without restarting Gunbot manually.

You can also run multiple instances of Gunbot on the same machine. Automation of running Gunbot instances can be done with pm2.


pm2 is an advanced process manager for production Node.js applications. you'll need some sort of script to make the two bots running. I'm not fluent in js, so can't help you more.

another way might be to instal two gunbots, each in a dedicated folder. then, you leave one bot stock, and the on other assign different ports each to the gui and the bot. you must search for free ports on your device prior and take note.
anotherr way still is to get a VPN. you install one on your VPN and one on your home PC. or, make a virtual machine on either and run one instance on the original and one on the virtual.
now I'm out of ideas.
« Last Edit: December 23, 2017, 11:38:03 AM by sloaleks »

Offline arranka

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Gunbot 7.0.1 How to use 2 exchanges in the same bot?
« Reply #2 on: December 23, 2017, 02:35:13 PM »

Which option would be the easiest to follow? I would like to be able to use another port for the second exchange

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.1 How to use 2 exchanges in the same bot?
« Reply #3 on: December 23, 2017, 04:19:18 PM »
I know you can change ports, for the gui it's in the wiki. fro the bot port, open config and set accordingly. when stock, the bot is running port 5001. try it, open a separate folder with a different name, download the bot, configure the bot port (other than stock), change the GUI port (to other than stock) and see what happens. open the first GUi on locahost 5000, assign the polo API to the bot, then configure and start. go to the localhost with your other GUI, assign the bittrex API, configure and start that one. see if it works. I can't do this for you, I have one license only.
https://github.com/GuntharDeNiro/BTCT/wiki/Advanced-usage

Offline arranka

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Gunbot 7.0.1 How to use 2 exchanges in the same bot?
« Reply #4 on: December 23, 2017, 05:16:57 PM »
thank you for the answer, I will try to follow these steps to see how I am doing and I report the results here.
The next steps will be to open another folder with different gunbot to the pole and there will configure the bittrex account.
trying to change the port, hopefully it works

I thought that in the same gunbot you could put multiple accounts, maybe changing the port, but I'll try what you tell me

thank you, I already communicate the answer

regards

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.1 How to use 2 exchanges in the same bot?
« Reply #5 on: December 24, 2017, 09:22:47 PM »
I have seen another user having trouble setting up multiple instances. I have just bought another exchange license and will try to set them both up in next few days.

Offline arranka

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Gunbot 7.0.1 How to use 2 exchanges in the same bot?
« Reply #6 on: December 26, 2017, 08:21:32 PM »
I put multiple instances in the same vps. One for poloniex another for bittrex. The poloniex bot I put it normally. Now in the bittrex folder, change the port to the config from 5001 to 6001


“ws”: {
“port”: 6001,



Then create a bat file in the bittrex bot directory

set PORT = 6000

gunthy-gui.exe

with that data, inside the bittrex directory I execute the .bat file
the console opens that says it now uses port 6000
login to the page http://127.0.0.1:6000

I do all the coin configuration, but when I give it to RUN it tries to connect to port 5000 instead of port 6000
what am I doing wrong?

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #7 on: December 27, 2017, 07:20:34 AM »
there must be some command line still linking to port 5000. we need to find it (as I now own two market licenses  8), I need to figure this out too) and change to the new port.

Offline arranka

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #8 on: December 27, 2017, 11:22:55 PM »
the way I did it if it works
first you change the port to config for 6001

the second is to create the bat file with the instruction that mentions
you put that .bat in the bot directory
you execute it, then you enter the gui but in port 6000
you do all the bot's settings, you save it

then you run the gunty.exe

there the console opens showing the statistics of the bot
only since gunty.exe works

from the gui you do not have to give it to run because it will always open port 5000

I hope you have understood what I wrote
and thanks to you for the help

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #9 on: December 28, 2017, 08:10:39 AM »
Yeah, all clear! Thanks for the information.

Offline cariocap

  • Rookie
  • *
  • Posts: 3
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #10 on: January 01, 2018, 03:49:23 PM »
I'm using windows version 7.02 and trying to open GB on port 6000 without success. I tried to changed the config files config.js and .config.json and put in the web console the websockets port to 6001. It only opens in port 5000. Anyone using windows version 7.02 in another port ?

Offline cariocap

  • Rookie
  • *
  • Posts: 3
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #11 on: January 01, 2018, 06:45:17 PM »
I found the problem.
You cant start GB from the browser, you have to start it from each directory. If you start from the browser it will allways start using port 5001.

Be careful that each time that you use the browser it resets the websockets port to 5001.
« Last Edit: January 01, 2018, 06:53:50 PM by cariocap »

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #12 on: January 04, 2018, 06:05:57 AM »
Be careful that each time that you use the browser it resets the websockets port to 5001.
No it doesn't. If you set the port in the GUI, it stays put. Settings changed in the GUI will refresh the settings in the config, but the settings changed in the config do not refresh the GUI. I'm now running two bots. I set up up each of them in their own GUI, start it up in the GUI to see if everything works, stop the bot, close the GUI, close the remaining command window, and then start both exe gunthys.

Offline ecab

  • Rookie
  • *
  • Posts: 5
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #13 on: January 05, 2018, 07:54:48 PM »
Very confusing.  I am trying to set this up now, and it's not working at all.  I tried to follow the previous post with no success.

1) I created a second folder (Exchange2) and put a fresh version of gunbot in 7.0.2
2) I created a .bat file with the following

set PORT=7000
gunthy-gui.exe

It executes with no problem
3) I changed the web socket to 7001, but i use localhost:7000 to login with no problem.  Then i setup my strategies setup API and so on in the Exchange 2 folder.  When i try to run it the other console windows opens up from Exchange 1 folder. 

At this point i am stuck.  For now i copied the Exchange 2 folder to another PC and have it running on there.  But my ideal solution would be to run it all from one box.     

 
« Last Edit: January 05, 2018, 09:21:37 PM by ecab »

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: Gunbot 7.0.2 How to use 2 exchanges in the same bot?
« Reply #14 on: January 06, 2018, 10:38:59 AM »
You don' need to do anything to the GUI port. Just open one at a time and change the BOT PORT in one of them. MAKE A PLAN, ON WHICH PORT WHICH BOT SHOULD RUN! WRITE IT DOWN SOMEWHERE! BOTH GUIS RUN ON STOCK PORTS!

 
1. run the first GUI exe and open the GUI. make settings to bot 1 and close the GUI once done, then close the cmd of the GUI,
2. go to the other folder and run the GUI exe in the other folder, then open the other GUI ON THE SAME PORT.
3. make your settings to bot 2 (in this instance YOU MUST ALSO CHANGE THE BOT PORT in the web socket settings),
4. close the other GUI, close the GUI's cmd.
5. NOW run gunthy exe files from both folders. You can't start multiple bots from the GUI, you must run them by their separate exe files.

DO NOT OPEN ANY GUI AGAIN, UNLESS YOU CLOSE BOTH BOT EXES.