Trading-Bots - Part 3 - Installation and configuring "Gekko"

I am not responsible for anything done with this bot(s). You use it at your own risk. 
There are no warranties or guarantees expressed or implied. You assume all responsibility and liability.


for the sake of simplicity I will copy some parts from my Trading-Bots - Part 2 - Installation and configuring "ZenBot" post since the first part is equal in most parts to the post before. Though I will still add some information to this part because on "Gekko" you need some things done differently. But now I´m back with the third part of my new series about the trading bots "ZenBot" and "Gekko". It took me some time because I tried to install "Gekko" on Windows 10 "the normal way" ... but this does not go well... some libarys are missing but dont get upset, you can use it on Windows 10 with something special called the Linux-SubSystem for Windows. This is an Ubuntu 16 or 18 shell right on your Windows 10 machine. Linux is not very hard to use but hard to master ;) with some practice you should be able to do all sorts of different stuff with this.

In this tutorial, you will learn how to install and setup "Gekko" on a Windows 10 machine running a Linux-SubSystem and on an Ubuntu 16/18 server, installing NodeJS as a requirement and configuring your installation with a config file. For these files, you need an API-Key from your exchange of chose. These are easy to obtain and only needed if you want to start the bot in "live trading" mode. But I will tell you more about the configuration after we have successfully installed our bot.

If you haven't read my first articles covering "ZenBot" and "Gekko" you can do so here.




If you need to insert a command in the shell and I don´t mention the distribution, you can insert the command on Windows or Linux equally.

*Image from "Gekko" GitHub page


For the sake of this tutorial, you need a Windows 10 or Ubuntu 16/18 machine with at least 100mb of free space and some experience with your operating system of choice. 

Windows 10 | Linux 16/18
Node.js (version 8.3.0)

Unfortunately "Gekko" has currently some problems with installing on a Windows 10 machine... But this is not a problem since Windows 10 can use an Ubuntu 16 or 18 bash which can be installed through the Windows 10 store. To do so, we need to do some steps in preparation.

This is taken from the "Gekko" docs HERE but slightly altered because I followed these steps and it seems that they miss something.
(I believe it was written by a time where the ubuntu subsystem was in beta)

Enable Bash on Windows 10 
To install Bash shell on your Windows 10 PC, do the following (see here for more info):

Open Settings.
Click on Update & security.
Click on For Developers.
Under "Use developer features", select the Developer mode option to setup the environment to install Bash.
On the message box, click Yes to turn on developer mode.
After the necessary components install, you'll need to restart your computer.

Once the components installed on your computer, insert this command into a Windows 10 PowerShell. You can open these by using the "Windows-Key" on your keyboard and then you have to enter "powershell" and it should appear in the searchbar. Right click on it and select "Run as Administrator".

Now enter in the newly opened PowerShell running as "Administrator":

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

After your computer restarts, you will notice that Bash will not appear in the "Recently added" list of apps, this is because Bash isn't actually installed yet. Now that you have setup the necessary components, use the following steps to complete the installation of Bash:

Go to the Windows 10 Store and enter ubuntu into the searchbar.

Select "Ubuntu 16.04 TLS" and install it. After the installation is completed, you can start Ubuntu 16.04.

Then you'll need to create a default UNIX user account. This account doesn't have to be the same as your Windows account. Enter the username in the required field and press Enter (you can't use the username "admin"). Close the "bash.exe" command prompt. Now that you completed the installation and setup, you can open the Bash tool from the Start menu like you would with any other app.


Now you should see something like this... I entered the first command "sudo apt-get update" to verify that everything is working.

All steps below are inserted into the UBUNTU-SHELL

Install NodeJS:

NodeJS is crucial for the installation since it contains the NPM-Packetmanager to install all the node modules required by our bot. Now we need to download not the latest NodeJS version since "ZenBot" does require NodeJS version 8.x to run. So please go ahead and download this release.

sudo apt-get update
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential

After installing NodeJS we should check that we installed the correct version. This can be accomplished with a single line of code inserted into the Ubuntu-Shell.

node -v  <-- show the current installed / used NodeJS version

It should show something like 



Install GIT:

I hope the installation was successful and we can move on to the next step which is key for an easy process. I don´t know your Linux skills and for the sake of simplicity, we are working with some very basic commands. To install GIT we only need to insert one command into our currently opened shell, this way you don´t need to download the files manually and also you don´t need to extract them.

sudo npm install -g git

This installs the GIT command line into our "GLOBAL NPM-Package" dir (-g) and we can use GIT now globally. This means, that you don´t have to download the files for installing the bot manually from GitHub. More advanced users who don´t want to use GIT can just download the Zip-File from with the green button on the right side. Then unpack and mount the file location. Now go on an insert these two commands.

git clone git://
cd gekko

It should look something like this.

Install "Gekko":

Ok, now you have the needed files on your hard drive to install "Gekko". Next, we need to switch our command shell to the folder just created by GIT and install the required NodeJS-Modules.

npm install --only=production

When the installation is finished it should look something like this.


Next, we need to install some more dependencies for the exchanges "Gekko" is using. Though we need to insert two more commands into the Ubuntu-Shell. One to switch to the "exchanges" folder and again an "npm install --only=production".

cd exchange
npm install --only=production
cd ..


Nice, it should look something like this when this last installation has finished. Did you mention the "cd .." command from below? I think you should save it somewhere in your brain for later because we will make some use of it in later tutorials. I also have to mention, that these commands can be used on Windows or Linux equally. Oh... I almost forgot to tell you its function... with the "cd" command you can ChangeDir CD get it ;) On your current shell window you can type as an example this command.

"cd ##dirname##/##dirname" <-- this changes you current directory in the shell

"cd .." <-- this will move you out of the current folder. It changes back to the upper directory if there is any


Finished? Yeah, we are almost finished with part 3 of our Trading-Bot series covering the bots "Zenbot" and "Gekko". This last part will cover our first starting of "Gekko" and exploring the frontend it provides you in the browser. Last but not least we make some backfills to get market data for our pair of coins and chosen exchange as well as doing a simple simulation.


Starting "Gekko":

I´m covering these last steps with some images of the frontend as well as showing some functions we are going to use. But first let´s start our instance of "Gekko". Again a single command should do the magic.

node gekko --ui


Your browser should automatically open with the UI. If it doesn't, and you see this message below, manually browse to http://localhost:3000.


Stopping Gekko 
In bash hold ctrl + c.

Exploring the frontend:

Now comes some screenshots with descriptions what they are used for.


Home screen ... not really much to do here 😅

Live Gekkos

Here you can start your bot in "Live Trading" mode so it uses your real money.


Here you can start the simulation with your chosen strategy on the data we collected on the "Local Data" tab following below.

Local Data

Next is the tab we want to use in a few minutes. Here you can save the "backfill" data for our simulations. To do so, we need to click on the button "Go to the importer" on the bottom of the page. Now you will see something like this.

I changed already our testing pair to BTC -> ETH and inserted the last month to start backfilling until the present day. After you clicked on the "Import" Button, you should see this.


Please wait for it to be completed


Here you can enter your API-Key(s) for the exchanges you want to be able to trade live on.


Nice we are almost finished. Just a last simulation with the data we downloaded before. I think it was not too difficult to come down here or was it? Since we have now a neat interface to play with, I think it was worth the pain 😜. To start the simulation, we need to go back to the "Backfill" tab and click the "Scan available data" button. This search the database for our data we should have already downloaded by now.



This was an easy task if you ask me. Next, we need to select our pair BTC -> ETH with the radio button right before our dataset and choose the strategy. I think we should go with RSI. You could adjust some parameter in the box on the right but for the sake of this tutorial, we will go with the standard parameter. Just enter 15 as candle size and change hours to minutes. 


Click "backtest" to start our first simulation. And voila we can see the result right below the "backtest" button.


Very good it already made some profit 😱. But don´t think that you are on the safe side. I think we should do some more test to see if we can make this result even better. 

This tutorial ends here and I hope you have learned something. Please let me know any issues below in the comments.

Best Regards

How do you rate this article?




Web & App Developer

Trading-Bots - All about ZenBot and Gekko
Trading-Bots - All about ZenBot and Gekko

Here you can learn how to use the trading-bots "Gekko" and "ZenBot". Both are NodeJS high-frequency trading bots written in JavaScript. I will cover all aspects like setting up your own bot up to real trading. I will also publish my results every week.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.