No description, website, or topics provided.
Clone or download
Latest commit c9745a5 Nov 15, 2018

Current Gunbot version : (v5.0.5.5 with WebGUI) Credits from commit 5a2e1d1d18b8823bd5682b73eb18ba6b8810d531 to:

  • rdonadono
  • tandyuc
  • 3kynox


  • To start the GUI, open a command console in this folder
  • Install node.js and do a npm install on this folder
  • Start it with node like node app.js
  • To connect to your webUI visit this link
  • If you use Chrome or another browser that doesnt allow self signed SSL certificates, visit this page and add an exception to the security warning you get on your screen:
  • Go back to
  • Visit the configurator page and make your changes
  • Visit the View page and select exchange and the first pair on the list (i.e. select poloniex > BTC_XMR > press CHANGE button)
  • press START and look at your console values to fill with trading datas.
  • Enjoy

  • To start without GUI: edit config.js with a text editor and then run the executable.
  • Enjoy

WebGUI informations for devs :

Work in progress

  • // to allow SSL exception in chrome - port / host / ws port on config.js
  • Events are emit from Gunbot like this >'getting_order_book', [this.Ask, this.Bid]);
  • This will return this.Ask and this.Bid in the "message"
  • We listen to the "message" on port we set in ws section in Gunbot config.js
ws = new WebSocket('wss://', {
		rejectUnauthorized: false
	connected = true;

	ws.on('error', (err) => {
		connected = false;
	ws.on('message', function incoming(data) {



When an error is caught, Gunbot emits a message like this:

}).catch((e) => {'getting_order_book', [], e.message);

So every wss message will have its own catch message if try method fails

  • List of actually present events, new events will be added with v5.0.6 (if you want/need other events emitted, post them in the issue tracker as feature request)'getting_balances', data);'gettting_trade_history', data);'getting_open_orders');'getting_public_trade_history', [this.getLedger().priceToBuy, this.getLedger().priceToSell]);'getting_ta', [this.highBB,this.lowBB,this.smas]);'sell_panic');'sell_trade', [amountToSell, priceToSellNow]);'message', 'STOP LIMIT REACHED!!! SELLING ALL YOUR ASSETS');'sell_trailing_stop', [quoteBalance, this.Ask]);'message', gunbotcallbacksell);'message', 'WARNING: we couldnt get a BOUGHT PRICE');'getting_ema_1', [ema1]);'getting_ema_2', [ema2]);'buy_trade', [quoteAmountToBuy, this.Ask]);'message', thismessage);'message', thismessage2);'message', 'No btc');'message', 'No new opportunities found');

To add more events in the GUI you need to:

  • add in the listener.lib.js the new case:
case 'getting_order_book':
        case 'getting_public_trade_history':
        case 'getting_ta':
        case 'sell_trade':
        case 'sell_trailing_stop':
        case 'getting_ema_1':
        case 'getting_ema_2':
        case 'buy_trade':
            for (var k in {
                if ( {
                    $("." + + "." + input.pair + "." + input.event + "." + k).text([k]);
  • add the bootstrap elements in the listener.html. For example we now have the span class like this:
<div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Public trade history</h3>
                    <div class="panel-body">

                            <li>Buy: <span class="exchange-placeholder getting_public_trade_history pair-placeholder price_buy">?</span></li>
                            <li>Sell: <span class="exchange-placeholder getting_public_trade_history pair-placeholder price_sell">?</span></li>

  • the span has the following classes: exchange-placeholder getting_public_trade_history pair-placeholder price_buy: do not remove paceholders and add the methods you want to add by addin the method name and the data message. For example:
    • it the websocket is emitted like this:
   			event: 'getting_ta',
   			exchange: exchange,
   			pair: pair,
   			data: {
   				price_high_bb: highBB,
   				price_low_bb: lowBB,
   				price_sma: smas
   			error: error,
   			time: (new Date).getTime()
  • the classes should be:

    • exchange-placeholder pair-placeholder getting_ta price_high_bb
    • exchange-placeholder pair-placeholder getting_ta price_low_bb
    • exchange-placeholder pair-placeholder getting_ta price_sma
  • and the span gets filled automatically