HomeWikiTool & appGekko: the free and open-source trading bot for cryptocurrencies

Gekko: the free and open-source trading bot for cryptocurrencies

Gekko is one of the best free cryptocurrency trading bots that can be found online. As an auto-trading software, it contains within itself a quite complex mechanism which is present on GitHub and, of course, open-source.

These programs are able to offer traders, newbies or experts, endless possibilities to approach the cryptocurrency market. Gekko is a software that provides both automatic trading and backtesting, is written in javascript and works thanks to nodejs.

Once installed, it is possible to develop and set up a trading strategy or start with the example strategies that are already integrated in the software package. In any case, Gekko works in three different modes:

  • Backtest: a simulation of the strategy is carried out on a period of historical data. Gekko shows what would have happened if the strategy had been applied in the past. It reports on a chart all the buy and sell orders that it would have carried out, as well as the various risk metrics along with many other factors;
  • Paper Trader: this strategy can be executed in real-time and simulate trading using fake money, in order to see in real-time the profitability of the strategy;
  • Tradebot: can execute the real-time strategy and automatically execute orders according to how it was programmed. The software uses the APIs of the exchanges in question.

All these modes can be performed via the user interface, which will display graphs and statistics on performance and risk. Gekko’s interface is very simple to use, whatever mode chosen.

1) Installing Gekko

Two separate explanations for Windows and Mac are provided on the official website, but there is no need to divide this into two parts, as there is a simpler and faster way to install Gekko on both operating systems.

1.1 Installation on Windows and Mac

1.1.1 nodejs

To make Gekko work it is necessary to have nodejs (at least version 6), a javascript runtime on which the whole software is based. Just download it from the official website and complete the installation which takes a few minutes.

1.1.2 Gekko from GitHub

Once finished, it is necessary to download Gekko and to do so it is sufficient to open a terminal and type:

git clone git://github.com/askmike/gekko.git -b stable

Pressing Enter will download the latest available stable version.

By removing the last part of the command:

-b stable

the version that will be downloaded will be the last in order of release, but it is always recommended to use the most stable version.

Note: If the Shell should report the following error:

-git- is not recognised as an internal or external command, an executable program or a batch file.

it will be sufficient to install Git from the official website.

For both operating systems, Gekko is installed in the directory:


it is now necessary to navigate to the Gekko folder with the cd command:

cd gekko

Note: Gekko is installed by default in this directory. Each time the user wants to run it, they must always navigate to the gekko folder with the command above shown.

1.1.3 Installing components

To install the dependencies that are necessary to use Gekko, it will be sufficient to type in the terminal:

npm install –only=production

Note: If any errors related to nodejs are generated, it is necessary to remove it and download a more advanced version, and reinstall it. The minimum required version is 6.

Installation of Broker’s dependencies:

cd exchange

npm install –only=production

cd ..

The last command is used to return to the previous folder in order to launch the GUI.

1.1.4 Updating Gekko

The command to update Gekko may be useful in the future, though it is not required at this time:

git pull

npm install –only=production

1.2 Installing on a Server

Gekko is used on laptops, desktops, but also on local servers or in the cloud. The real function of a bot is to be running day and night, so the most classic solution is that of a simple server.

The whole installation process is the same as the previous one for Windows and Mac. However, to have remote access, you will need to open and edit a configuration file.

Just go to the path gekko/web/vue/ and open the file UIconfig.js with a simple text editor replacing all the contents of the file with the following code:

const CONFIG = {

  headless: true,

  api: {

     host: ‘’,

     port: 3000,


  ui: {

     ssl: false,

     host: ‘x.x.x.x’, //IP of the server hosting Gekko

     port: 3000,

     path: ‘/’


  adapter: ‘sqlite’


It is now possible to access Gekko by specifying this path in the browser:


Where x.x.x.x is the IP address of the server on which Gekko is located.

1.3 Installing on Docker

The “Docker” software is a containerisation technology that enables the creation and use of Linux containers. Installing Gekko in a Docker container is very simple, just open the terminal and type:

$ docker-compose build

$ docker-compose up -d

and by connecting to http://localhost:3000 the user will be faced with Gekko’s screen.

2) Using Gekko

2.1 Gekko Start

To start Gekko just open a Shell and type in a couple of commands:

cd gekko

node gekko –ui

Note: If the browser page does not open automatically, it must be started manually by typing in the url:


2.2 Local data

Local data are those time intervals on which Gekko applies backtesting. This example shows how to import the bitcoin graph against the dollar, BTC/USD, to Bitfinex.

Here’s Gekko’s main screen:

The Local Data tab shows the available data on which to apply the backtest:


By clicking on Go to the importer! it will be possible to import cryptocurrency data from different exchanges on which to apply the strategies, for example, Bitfinex as the platform and as currency and asset USD and BTC respectively.

As can be seen below, Gekko offers the possibility of backtesting the data downloaded so far even if the download is not complete yet. Once 100% is reached, the software alerts the user:

2.3 Backtesting

Backtest means testing a strategy, either own or predefined, over a past period of time in order to verify the profits or losses that that strategy would have generated.

Select a dataset allows choosing the data that has just been downloaded. A widely used strategy is to follow the RSI indicator, one of the most famous in technical analysis.

This is the result achieved with the Backtest function:

In this case, the report shows a loss of about 2.64%, the roundtrips allows checking all the actions that have been performed by the bot.

2.4 Paper trader

Using Paper trader mode it is possible to follow the strategy in real-time and simulate trading (using fake money) in order to see in real-time the profits, or the losses.

2.4.1 API keys

For this mode, it is necessary to provide Gekko with the API of the exchange which will be used. The process for inserting them is very simple, simply go to the Config tab and press the Add an API key.

As the software notes, it is important that the generated APIs have permission to modify orders and to display the balance available on the current exchange. Even though fake money will be used in this mode.

The tab of interest now is the one called Live Gekkos.


It is necessary to choose an example exchange, a strategy, an asset and a currency, keeping in mind to tick on the right the Paper trader choice, and then Start.

It is possible to observe how the strategy works in real-time, this is a good way to verify its strength.

2.5 Tradebot

Tradebot is the most fundamental way to use the software. Once the backtest has been performed on local data downloaded from the exchanges, and the strategy has been analysed using the paper bot, it can now be applied in real-time with the money or currency actually available on a given exchange.

In this case as well, it is necessary to provide Gekko with the API keys using the same procedure as for the paper trader.

The image below shows the configuration:

2.6 Limit orders

Gekko does not process market orders, because of the small but inevitable latency of interconnection between the software and the exchange, so it uses limit orders. When Gekko makes the decision to buy or sell and the price changes abruptly, without reaching the limit order, then this order will never be executed.

It is advisable not to use the bot with 1-minute candles since the volatility of the cryptocurrency market shows that in one minute the price can change abruptly.

Gekko executed the buy order (green dot) by buying some IOTA. After a while, the sell order was also executed. Even if it doesn’t seem so on the chart, it will be enough to zoom out the timeframe to display it correctly.

The following information is displayed: strategy used, profit report, market graph and roundtrips which show all the operations carried out with the relative profits/losses.

Note: In this case, the price dropped slightly in about 15 minutes, so there was a loss of 0.18% which was also due to the fees retained by Bitfinex.

Every operation can be kept under control by viewing the order book in the relative exchange and checking that it actually corresponds to the orders made by Gekko:

Or by checking the terminal and verifying that the bot is actually acquiring information from the exchange:

3) Strategies

Strategies in Gekko are written in Javascript. For anyone who knows a bit of programming, it won’t be difficult at all to manipulate the predefined ones or create their own.

3.1 Examples

There are some predefined strategies that have already been tested on Gekko. Each of these is also based on a few parameters that can be set at will. All these scripts are placed in the strategies folder.

3.2 Custom strategies: what is the best strategy?

The perfect strategy doesn’t exist. Most forums and the creator of Gekko himself, recommend combining different indicators to create one or more custom strategies. They are particularly useful in a market where volatility is the order of the day and each crypto responds differently to the general trend.

  1. Conclusion

Searching well within the forums there are many answers to this question, but be wary of those who show a screenshot showing a profit of 1000%. There are strategies that work perfectly in backtest but are very bad when it comes to real-time use.

4.1 Supported exchanges

Here are all the exchanges supported by Gekko and the various columns show all the ways in which Gekko can operate on each exchange.

Exchange Monitoring Live Trading Importing
BTC Markets
Quadriga CX

4.2 Does Gekko work?

All information found within this article is for informational purposes only. No advice is given about trading or any way of earning with the use of Gekko. However, to answer the question, Gekko works very well and other projects related to it are underway, such as GekkoGA (with the use of genetic algorithms) and many other plugins.