Skip to content
/ gekko Public
forked from askmike/gekko

A bitcoin trading bot written in node

Notifications You must be signed in to change notification settings

matbest1/gekko

Repository files navigation

Important note

You are looking at the new and completetly different version of Gekko that is being developed right now. It is not stable yet, it might crash and we need to validate the advice to be solid.

What we know doesn't work

  • Real trading (I am not implementing this until I have validated advice).
  • Might crash :(

What we hope does work

Everything listed in the Configuring Gekko Doc. This document lists everything you can do with Gekko and how to do it.

Here is the todo until the new version is considered stable.

If you encounter a bug: check out in the issues if we are aware of it and if not create a new one :)

Gekko Build Status

The point is ladies and gentlemen that greed, for lack of a better word, is good.

Gordon Gekko

-Gordon Gekko

Gekko is a Bitcoin trading bot and backtesting platform that connects to popular Bitcoin exchanges. It is written in javascript and runs on nodejs.

Main features

  • Trading platform:
  • Paper trading
  • Live trading (trade bot)
  • Backtesting
  • Market API / interface:
  • Emit market events
  • Basic IRC Bot

What?

This project is a learning excercise of me, a student with some experience in programming (mostly web) and zero experience in economics and trading. I figured writing my own trade bot would be the best way to learn about implementing mathematical trading algorithms. So here is my very first attempt at anything related to trading / algorithmic decision making.

As this is a learning experience for me all feedback is extremely appreciated. If you don't want to contribute to the code you can always just send me an email or leave feedback in the Gekko thread on the bitcointalk forum.

Use Gekko at you own risk.

Trading platform

Gekko can watch the realtime markets. You can apply automated trading methods to realtime data coming in to do live or simulated trading (automated trading or paper trading). Gekko also stores the market data it sees so you can run the trading methods with simulate trades on a set of historical data to see whether they would have been profitable during that time (backtesting).

Gekko, as well as the current bitcoin exchanges, are not built for HFT or anything related to being the fastest. The trading methods Gekko can do are based on indicators used by human day traders. The result is that Gekko does not look at data below the one minute timescale and (depending on configuration) and will normally not trade more than a couple of times per week (also depending on configuration).

So Gekko is not:

  • A trading platform for human day traders with a GUI and charts.
  • A High frequency trading bot designed to operate on < minute resolution.

Installing Gekko

Windows user? Here is a step-by-step guide on how to get Gekko running on Windows.

Gekko runs on nodejs, once you have that installed you can either download all files in a zip or clone the repository via git:

git clone git://github.com/askmike/gekko.git
cd gekko

You need to download Gekko's dependencies, which can easily be done with npm:

npm install

Configuring Gekko

Read the configuring Gekko documentation.

Running Gekko

To run the bot you just have to start Gekko:

node gekko

You can also run Gekko silently, for examples on how to do this check out the advanced features.

Updating Gekko

If you installed the bot via git you can easily fetch the latest updates by running:

git pull && npm update

What is Gekko doing?

If you started Gekko it will remain open in your terminal and log out new information, for example:

start time:  2013-05-19 23:17:38

I'm gonna make you rich, Bud Fox.
Let me show you some Exponential Moving Averages.

2013-06-02 18:21:15 (INFO): ADVICE is to HOLD @ 117.465 (0.132)
2013-06-02 18:21:15 (INFO): (PROFIT REPORT) original balance:    207.465 USD
2013-06-02 18:21:15 (INFO): (PROFIT REPORT) current balance:     217.465 USD
2013-06-02 18:21:15 (INFO): (PROFIT REPORT) profit:          10.000 USD (4.820%)

After the first fetching, every new interval (in the config) Gekko will fetch new trade data, advice on what to do and give a profit report:

Advice

  • HOLD means don't do anything, we are either not in a trend or the trend has not changed since last check.
  • LONG means the trend has changed to an uptrend, advice is to buy now so we can sell at the end of the trend.
  • SHORT means the trend has chacnged to a downtrend, advice is to sell now so we can buy back at the end of the trend.

After every line of advice we can see the current price Gekko calculated and the difference in EMAs, this makes it easier to understand the advice.

Profit report

The profit report will log out Gekko's profit since it started, this is done using a buy and sell simulations (regardless if you have automatic trading enabled or not). Gekko applies the configured trading fee on both simulated sells and buys.

If Gekko logs 20% that means that if you would have had automatic trading enabled on an exchange account with a balance of 1BTC, you would now have 1.2BTC.

Buying and selling

If you configured Gekko to automatically sell on this information it will also log:

  • NOW going to BUY, when it is buying BTC.
  • NOW going to SELL, when it is selling BTC.

TODO

  • More exchanges (cryptsy, bitfinex, kraken, btcchina)
  • More trading methods
  • Webbased interface

Credits

  • The title is inspired by Bateman.
  • This project is inspired by the GoxTradingBot Chrome plugin (though no code is taken from it).

Final

If Gekko helped you in any way, you can always leave me a tip at (BTC) 13r1jyivitShUiv9FJvjLH7Nh1ZZptumwW

License

The MIT License (MIT)

Copyright (c) 2013 Mike van Rossum [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A bitcoin trading bot written in node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published