Installing Bitcoin trading robot Gekko on Ubuntu 12.04 LTS


Gekko is a Bitcoin trading robot written in Node.js (Bitcointalk thread, Github). This post will cover installation of Gekko on a fresh Ubuntu 12.04 LTS system.

 

Installation

First, install the system level dependency, Node.js:
sudo apt-get install nodejs

Check out the Gekko code from Github:
cd $home
git clone git://github.com/askmike/gekko.git

Install more dependencies through the  Node.js package manager:
cd gekko
npm install

Finally you can test the installation by running pre-configuration:
node gekko

You should see output like this as the bot begins to calculate:

2014-01-20 23:21:24 (INFO):     I'm gonna make you rich, Bud Fox.
2014-01-20 23:21:24 (INFO):     Let me show you some Exponential Moving Averages.


2014-01-20 23:21:24 (INFO):     Using normal settings to monitor the live market
2014-01-20 23:21:24 (INFO):     NOT trading with real money
2014-01-20 23:21:27 (INFO):     Profit reporter active on simulated balance
2014-01-20 23:21:27 (INFO):     Calculating EMA on historical data...
2014-01-20 23:23:28 (INFO):     ADVICE is to BUY @ 952.688 (0.335)

 

Live trading

The next step is to configure the bot for live trading.  Lines 28 through 38 of the configuration file contain this stanza by default:
// Monitor the live market
config.normal = {
  enabled: true,
  exchange: 'MtGox', // 'MtGox', 'BTCe', 'Bitstamp' or 'cexio'
  currency: 'USD',
  asset: 'BTC',
  tradingEnabled: false,
  key: 'your-key',
  secret: 'your-secret',
  username: 0, // your username, only fill in when using bitstamp or cexio
}


You can edit this file:
cd $home/gekko/config.js


Then modify the defaults as follows in order to enable live trading:
  • Optionally change the exchange to one of the commented choices
  • Optionally change asset to a different cryptocurrency
  • Set tradingEnabled to true
  • Set key and secret from the exchange's account/API page
  • Set username if applicable.

 

Further configuration

One important parameter to change from default will be the timeframe, EMA weight, candles and thresholds. These are found at "Exponential Moving Average settings" just above the account info section. Changing these settings helps prevent your bot being farmed by clever traders who know its default moves and set traps in the markets.

There are many other options such as email on buy or sell advice (free alerts!), profit calculation for advice, and even a backtesting feature (currently in alpha). And the authors of Gekko, led by lead developer "askmike" have plans for many new features in the latest development version, like a web interface and a local datastore for better support of alternate cryptocurrencies.

No comments:

Post a Comment

Comments welcome!