GUNBOT V3 FOR MAC OS X
INITIAL SETUP
Ideally you will want to use a dedicated exchange account for running your Gunbot on, this way you can keep your Gunbot trades separate from your manual trades, thereby reducing interference. One strategy members of the group use is to transfer bags (coins bought during a crash, dump or price drop) to their manual account, so that Gunbot can continue to run on the new price level.
For trading on Poloniex, make sure you have your API key and
Secret available. You should have 2FA set up to view your secret, if not, I recommend you set that up for poloniex using the google authenticator app. You will need to share this API key with Gunthar for him to validate your license. You will not want to share your secret with anyone however, Gunthar, myself, or anyone else included, so if you accidentally post it anywhere where others can view it, you will want to renew your API key so it can remain secret. Also of importance, for Bittrex, you will only be shown your secret once, so take note of it while you can.
For the latest Gunbot releases, either use the link Gunthar provided in your welcome package, or visit the following link:
https://github.com/GuntharDeNiro/BTCT/releasesNow find the unzipped folder in your downloads and move it into the location you want to operate it from. For Gunbot Version 3.3.2 (latest as of 5th of June 2017) you will find a pre-prepared currency pairing for Poloniex.
CONFIGURATION
Open with the text editor of your choice the file poloniex-BTC_
XYZ-config.js.
A word of warning for Mac users here, I use Atom text editor, but if you want to use Mac's standard text editor, you will want to open preferences for that application and turn off 'smart quotes', or else every time you edit parameters in the config file, curly quotes will wreak havoc on your Terminal prompts, returning red syntax error after syntax error. All quotation marks must read as '
or ''
or else. If you have syntax errors later on, always check this, and ensure the config line ends in a comma!For now, you will want to alter a few things in this config file, first of all the name of the file itself. For Bitcoin to Ethereum, you will want to name the file: poloniex-BTC_ETH-config.js
Now, for Poloniex, you will want to find the lines:
//---POLONIEX
POLONIEX_KEY: 'xxx',
POLONIEX_SECRET: 'xxx',
You will want to replace these 'xxx's with the relevant information.
You will want to also alter the following lines DEFAULT_CURRENCY_PAIR to 'BTC_ETH', And then you will want to choose a strategy, to start I recommend BUY_STRATEGY: 'BB' and the same for SELL_STRATEGY: 'BB', and keep LOW_BB and HIGH_BB at 25. You will want to eventually learn how these strategies actually operate, and for that the forum and telegram group are your friends. Here is a start:
https://gunthy.org/index.php?topic=193.0You will also want to adjust BTC_TRADING_LIMIT depending on the size of your capital, balls, or ego. I recommend keeping it low until you know what you are doing. Nobody wins the lottery on their first ticket.
Ok, now you have your first currency pairing complete, and I should tell you that this is the exact same process you will want to replicate for any additional currency pairings with one caveat. For trading in ETH, XMR, or USDT, the BTC_TRADING_LIMIT remains as is, it is NOT ETH_TRADING_LIMIT, so don't change it, the number will substitute for that respective currency, so if you want your trading limit per trade as 1 Ethereum, then leave it as 1, but if you leave this as 1 for USDT, don't be surprised to find you have a max trading limit of $1. I don't need to remind all you who are late to the party that 1 BTC is no longer 1 USDT, so this value is important, so find your own limit that suits your own style and expectations; the larger the limit; the larger the reward; the larger the risk. The choice is yours.
In your Gunbot folder you will also find a file called ALLPAIRS-params.js and yes, these settings will affect all your pairs.
I recommend you include the following lines between the curly-braces (that is these: { }):
BOT_SLEEP_DELAY: ((1001)*90*(Math.random()*0.3+0.7)),
BOT_MAX_LIFETIME:999999999,// overall bot lifetime(koef*min),
BOT_ON_FAIL_DELAY:((1001)*120*(Math.random()*0.3+0.7)),
This randomizes your pairs so to minimize them all calling Polo at once, which will reduce your '422' and '429' error codes at times of peak server traffic. If you are suffering from these, you will want to increase the numbers between the asterisks, so perhaps 90 becomes 120 and 120 becomes 180, or you can experiment like the newly-weds you are until you find what works best for you.
TERMINAL
Ok, now you're ready to open a new Terminal shell (you can find this in a spotlight search if you don't already know).
Instal Homebrew if you haven't already at
https://brew.sh So for example, it will ask you to paste the following (as of 5th June, but check website for latest update) into a Terminal prompt:
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
It should install... Next you will want to install node... Type the following into your terminal shell:
brew install node
And it should install...
Now, in terminal you want to change directories to where you have located your Gunbot folder. The simplest way to do this is to right click and copy the folder, then paste it into Terminal preceded by 'cd'.
It should look something like this:
cd /Applications/Gunbot/Gunbot\ 3.3
Now you are ready to setup your first currency pairing.
GUNBOT LOCK AND LOADED
First, if you are curious as to which currencies to choose (if you do not have the currencies.js file in your Gunbot folder as it was phased out with 3.2, you can download it by clicking here:
https://gunthy.org/index.php?action=dlattach;topic=394.0;attach=183) - If this is not working for you, then you can download the .zip from Gunther's Github for Version 3.1 which will have the currencies.js file attached, you can then copy this one file into your latest update Gunbot folder. Some people have been having difficulties with this stage, and this could be a dependencies issue, which this simple guide could help you to solve
https://treehouse.github.io/installation-guides/mac/node-mac.html, also it is possible that installing Xcode could help, it is available for free download from the App Store in their 'essentials' section (
https://itunes.apple.com/gb/app/xcode/id497799835?mt=12).
You can then type the following into a new terminal shell, (remember to first cd to your Gunbot folder as above, where you have moved the currencies.js file to):
node currencies.js
And the shell will show recommended currencies to trade, updating every hour. However, the trick is to find entries before they show up here, and the rules here are similar to the logic with manual trades. The higher the price increase, the larger the coin volatility, the larger the Bollinger bands, the greater the risk of you getting burnt. And you'll wish you had listened to me when I told you to use a small trading limit value until you were better acquainted with your Gunbot.
Anyway, enough with the pontifications,
Open a new shell, cd to your gunbot folder if you haven't already, and, in the case of our example of BTC to ETH, type in the following command:
./gunthy-macos BTC_ETH poloniex
And it should work every time, and when it works, and you are ready for your next pair, the same as above applies, you will want to create a new config file in your gunbot folder, let's say we want ETH_ETC this time, your file should read poloniex-ETH_ETC-config.js and you will want to alter your trading limit to your desired value, and then you are ready to open your new terminal shell, cd to your gunbot folder if you haven't already, and prompt:
./gunthy-macos ETH_ETC poloniex
And a word of advice, you will want a second Poloniex account for trading ETH and XMR from, or USDT. It will make life simpler, and it'll mean you can trade the same pairs with those currencies as you do with your BTC, without the bots battling each other. The time for arbitrage will come, but this bot isn't the one.
GUNBOT MONITOR
Now you have all your bots up and running, you may like to see what they're all up to, and beer-k0in has developed a tool for you here:
https://gunthy.org/index.php?topic=319.0To instal, in a new Terminal shell enter the prompt:
npm install -g gunbot-monitor
To run it, prompt:
gmon [options]
COMMUNITY POLONIEX PROXY
The Gunbot Community Proxy is intended to mitigate against 422 and 429 errors on Poloniex, this will allow you to run reduced delay times without running into API call errors.
As the community continually expands so does the help and support provided by our peers. I have to thank Max and Taniman (Telegram: @meeehx and @Elroy) for respectively providing us with both the resources required to write this proxy guide and the proxy itself.
This guide will mirror the tutorial found here, and so a credit of thanks is also due to Mr Cryptobot for his work:
https://thecryptobot.com/2017/07/05/gunbot-proxy-community-edition-install/Ok, let's get down to it...
Did you install Homebrew at
https://brew.sh? I hope you did, but if you didn't, go open up a new terminal shell and paste the following (as of 5th June, but check website for latest update) into a fresh Terminal shell:
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
It should install... Next you will want to install Java 8... So paste the following (as of 11th July, but check online for latest versions if you so please) into a terminal shell:
brew cask install java
It should install... Did I say patience is a virtue?
Now you will want to download the Community Proxy from
https://github.com/taniman/gunbotproxycommunity/releasesYou will want to download both application.properties and GunbotProxyCommunity-x.x.x.jar (x.x.x. refers to latest release, which as of 11th June is 0.9.7.)
Now transfer these two files into your designated Gunbot folder.
Now you will want to edit the relevant ALLPAIRS-params.js file to include the line:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
But where do I paste this I hear you (forget to) ask?
After "module.exports = config;" and then save the file.
Now generate two new API Keys and register them with Gunther, you will want to leave the Trusted IPs setting as default, so you are met with the fear inducing message: "Any IP address can use this API key to access your account. This is not recommended if you ever want that Lamborghini the snakeskin oil salesmen promised."
But you're not that guy, you're stronger than that, you know you can make do with a Tesla Model 3 eventually, and you know it is recommended for this installation, and you think you will be safe, so long as you keep your API secret to yourself, speaking of which, as this stage you will want to note down along with your two new API keys.
Now open up your applications.properties file, which I hope you moved into your gunbot folder. Now search for "gunbot.location = file://" in the text and insert your gunbot folder location, so for example, if you recall from before, my Gunbot folder is located thus: /Applications/Gunbot/Gunbot\ 3.3 and so it should look like this:
gunbot.location = file://C:/Applications/Gunbot/Gunbot\ 3.3
But if you are lazy/ haven't yet developed OCD like me, then it might look something like this: gunbot.location = file://C:/Users/admin/Downloads/GUNBOT
And if you run your Gunbot from your downloads folder, then it will work fine. Just as you can still sleep in your bedroom with its carpet of crumpled clothes.
Now, insert your first API key and secret into "default_apiKey" and "default_apiSecret" and then your second API key and secret into "apiKey1" and apiSecret1"
Now, search for "doubleBuyProtection=true" and add this piece of code after the above line: "logging.level.nl.komtek=INFO" and it should look like this:
doubleBuyProtection=true
logging.level.nl.komtek=INFO
Ain't that something cute? When did I become such a fucking nerd? Do girls actually like nerds? Surely they'll like my Lambo though? When will he stop saying that word... Save the file...
Now open a new terminal shell, type sudo nano /etc/hosts and then hit enter. Check if your girlfriend, or mother, is looking over your shoulder and enter your administrator password.
You are now using Nano Editor for your Host File. How does that make you feel? Empty?
Move your cursor to an empty line and insert 127.0.0.1 poloniex.com
As you wonder how you ever got here in the first place and why did Poloniex have to crush your inter-stellar rippled dreams you push
Control-O, then hit ENTER to save changes, then Control-X to exit Nano Editor
And as you wonder whether you're like all the other Lambo boys who despite their beliefs and rabbit hole denialism will barely be ably to buy a Lamborghini Tractor yet alone a Huracan by the end of all this (yes, building tractors is where Ferruccio Lamborghini began, and buying them is where you'll likely end if you're lucky)
And as you wonder how it got to this, you remember four-twenty-two isn't a rap song, but just another experience from your painful past, and you're here and you're finally ready to run the community proxy for the first time, so before we all revert to an Italian agrarian reformation because the idea of a Lamborghiniless future is too futile an existence for your fickle fortress of a soul, you open a new terminal shell and type:
java -jar GunbotProxyCommunity-x.x.x.jar
And if that didn't work, you haven't been paying attention well enough, and as you feel that Lamborghini slipping even further away into a tragic case of transmogrification; becoming tractor; becoming rust; becoming dust just like you, you remember you forgot to change x.x.x. to the relevant version.
And if you are successful, you should see lines like these:
2017-07-08 20:03:56,264 [pool-2-thread-3] INFO GunbotProxyService - ticker updated
2017-07-08 20:03:59,149 [pool-2-thread-3] INFO GunbotProxyService - ticker updated
2017-07-08 20:04:02,040 [pool-2-thread-3] INFO GunbotProxyService - ticker updated
2017-07-08 20:04:04,949 [pool-2-thread-2] INFO GunbotProxyService - ticker updated
2017-07-08 20:04:07,834 [pool-2-thread-5] INFO GunbotProxyService - ticker updated
Now open a web browser and go to:
http://localhost:8081/public/You should see: Intercepted
And you will have successfully installed Community Proxy
And you can welcome yourself to the Community's telegram group:
https://t.me/joinchat/FWYlMkKK-mkrSuj836ehugBut, if after all you decide to follow this dream with the same fervor as all those others you abandoned previously, and you decide, you know what? This divine sense of dissatisfaction can stay, it's only one more discarded dream anyway, and I live in the United States of Amnesia still, so while a Huracan would be nice, a tractor will suffice, well then... You can go ahead and
uninstall the proxy thus:
1. Stop the Java process from running (do a Control-C in the Terminal box)
2. Delete the additional line from allpairs-params.js (or you can just comment it out with a "//")
3. Delete the additional line from HOSTS file (or you can just comment it out with a "#")
4. Delete application.properties AND GunbotProxyCommunity-x.x.x.jar from your Gunbot folder
5. You have uninstalled the Community Proxy from Gunbot
ANYTHING ELSE?
Now you have all you need, but there are further options to facilitate your operations. The forums are your friend, and there are many posts related to plugins and add-ons and various methods and strategies. PM2 for example can help to start, restart, and adjust all your pairs at once, and perhaps I'll return to provide a tutorial for that on Mac in the future if you can endure it. But for now that's more than enough to get you running.
Furthermore, there is little that cannot be learnt through either the search function on the Gunbot Telegram group or this forum, however, if you need any further assistance, do not hesitate to post here, or contact me on Telegram, where you can find me as Electric Wizard.
Also, if you have any additions of your own for our fellow Mac OS X community members, I would greatly appreciate if you share them in this space.
For now, thank you and...
If this post has helped send a beer to my BTC tip jar and it will be greatly appreciated:
1MXpYZaCVU3fqZAsHP6H2BbuFz8rADk8D3